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
Thanks. I am getting ready to try now.