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?
I use 10.2. But I get the same result.
I use 10.1. With the demo I found I can add the record but I can not undo the added records. I checked online help of 10.1. There is no AddNewRecord function. But it mentions that the datasource should implement IBindingList.
On the other hand, I need to add record in the middle of collection not only at the begin or the end. It looks AddNewRecord can not control the position of the new record.
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.