I want to perform an Undo on the ultragrid or dataset. At the moment im doing the logic below, can you point me into the right direction
this.BindingSource.RaiseListChangedEvents = false; this.BindingSource.CancelEdit(); this.DataSet.RejectChanges(); this.ultraGrid1.UpdateData();
Hello,
You could use AcceptChanges and RejectChanges methods of the underlying DataSet/DataTable. For more information please look at the following links:
http://msdn.microsoft.com/en-us/library/system.data.dataset.acceptchanges%28v=vs.71%29.aspx
http://msdn.microsoft.com/en-us/library/system.data.dataset.rejectchanges%28v=vs.71%29.aspx
Also I have created a small sample to illustrate how you could do this. Please run the sample and make some changes on the grid. The modified row is in Red if you reject or accept the changes all rows become black.
Please let me know if you have any further question about Infragistics components.
I just got through trying the example. I notice if enter another row into the ultragrid. and dont accept changes. the reject works just find. But if I accept changes and then try to rejectchanges or reject the row I just added it does not work. Shouldnt I be able to save changes or add another row, accept the change and reject changes if i want
Hi,
I just wanted to know if you were able to solve your issue based on our suggestions or you still need help? Just let me know.
Thank you.
If you cancel a change in the grid or the DataSet, that data is lost. There is no redo. You would have to store the data before the cancel and then implement your own redo functionality.
I finally made it around to the requirement today and it works perfectly. Thanks for you help.
Can you point me in the direction of redoing the change to the dataset after I undo a change?
Hello ,
If you need any further assistance on this please contact us.
I havent incorpoarated the changes or tested. I move on. I am going to complete all the requirements of my app, then come back to the reject changes, i have a deadline. so i am going to approach the rejected and accept changes hopefully today sometime. I didnt want to get to hung up on one thing