I have a C# winforms app that in the ultraToolbarManager click event fires the following code when the user clicks the DELETE button in the toolbar:
myGrid.PerformAction(UltraGridAction.DeleteRows);
This works fine for most scenarios. Now though, I have some child records that need to be deleted as well. In order to delete these child records through a custom routine, I need to pull a key value from one of the columns of each deleted row (you can delete multiple rows at once in the grid).
First, I need to know if the user deleted the records or if they canceled. Is there a way through code to do this or do I have to have logic in the AfterRowsDeleted event to account for this?
Second, how do you determine what rows were deleted?
Not that it couldn't be solved on the grid level, but you might consider to implement such stuff on the datasource level?
Like let's say you bind to an DataSet and handle the things that have to be done on row deleting in the dataTable.RowDeleting event.
Kinda more "central" and you don't need to worry about "how" the user interface deleted it.
I agree, however in my case that is not an option due to the way our data is stored in such a way that using the DataSet would not work.