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
2385
How to undo the action of adding records
posted

I have a observablecollection binding to the grid datasource. I add records by insert element into collection. I found I can not use the undo to remove an added records. Who know how can I do it?

Parents
  • 9836
    posted

    Undo operation works only when you add the new record through the AddNewRecord functionality of the grid. In order to make this works when you add directly to the collection, you can  listen to the CollectionChanged event of the ObservableCollection and delete the new added object when it doesn't meet any creterias. You can also obtain the DataRecord that is generated from the grid and use the undo operations as well. Please, check the attached sample and let me know if this works for you.

    UndoOperations.zip
Reply Children