Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
705
UltraGridAction.DeleteRows --> how to determine user action and also deleted row information
posted

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?

 

Parents
No Data
Reply
  • 130
    posted

    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.

Children