Hi,
I have a ultrawingrid bounded with dataview. When ever user does some data changes in the grid I enable Save and discard buttons. If the user clicks on the discard button I rebind the ultrawingrid with the data source and disable both the buttons again.
UltraWingrid.DataSource = dataview
the grid is again updating the data source which is causing save and discard buttons to get enabled.
In brief I want to cancel the edits which user made before rebinding to data source but i think what grid is doing it's trying to save the current changes to the data source before getting binded again with the dataview.
the updatemode for grid is onupdate.
Could you please tell why this is happening and how to stop this?
I am using .net 2.0 and infragistics version - NetAdvantage 2006 Volume 1 CLR 2.0
thanks,
Mandeep.
What is your underlying DataSource? I would think that the grid shouldn't be updating anything until you specifically call Update, as is mentioned in the description of the OnUpdate setting, so there might be something else that's going on. If you happen to be using a DataSet, which you may be since you're using a DataView, there is a RejectChanges method that you could use. If not, perhaps you could try setting the DataSource to null before re-setting it to your data view.
-Matt