I have an ASP.NET application and on one page there is a gridview that uses an ObjectDataSource to call a method that is located in another class named "Device". Well this class returns a speciala datatable. This is working.
Now I need a method for updating data and for this I cannot use the class Device, so I would like to use the "RowUpdating" method of that grid from the code behind. I even wrote the code for this method and it is working and the method fires, if the user clicks the "Update"-button in the grid.
Now to the problem. Because I am using the ObjectDataSource and I have an Update-command in that grid, I also need to specify and Update-method for this ObjectDataSource and this is the point. I want to use the RowUpdating-method from my code behind and not the update method from that ObjectDataSource. My current solution is a method in the class "Device" that just goes back via a "return" command and so the RowUpdating from my code behind is doing the job... but this cannot be the "only way how it works".
Help and further tips would be grateful. Thank You!