Is there a way to enable undo of deleting a row in a grid? I searched for classes related to undo/redo
and only thing I could find is ActionHistory from WPF library.
Thanks
As I mention in this thread, the grid does not maintain a list of deleted or modified rows, so it would be up to the underlying DataSource to maintain the list of deleted rows and undo the deletion. In the case of the DataTable, this logic already exists, as mentioned. Another option might be to maintain the list of deleted rows from the DataSource yourself in a stack (i.e. maintain your own history) and re-add them to the data source if you need to undo the deletion.
-Matt
The difficulty is integrating the undo along side of UltraGrid's regular undo stack. I can maintain the deleted
data in my own stack. But when a user press Ctrl-Z to undo, how can I tell it's my turn to undo vs UltraGrid's
turn? Only way to achieve that is somehow to add to UltraGrid's undo stack. But after peeking into its
source code, I found all undo related classes were internal. Is there a way to manipulate Infragistics'
undo stack?
Hong