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
145
undo of DeleteSelectedRows for a grid
posted

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

Parents
No Data
Reply
  • 37774
    posted

    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

Children