We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to find whether a Grid/Grid record has been changed or not.

We want to identify Whether a record/records in the grid have been changed by the user or not. For e.g. We Query a set of records from the db and show it in a grid. When we have to save the changes in the form,we want to find out which records in the grid have been Changed by the user and call the db operations only for those records. What is the best way to do this ?

1 Reply

AD Administrator Syncfusion Team January 13, 2005 07:34 AM

The grid does not really track what records have changed, but if you are using a DataTable datasource, it does. You can use a DataView to get the modified records, or you can loop through the DataRows in teh DataTable and check each row''s RowState to see if it has been modified. //dt is the datatable DataView dv = new DataView(dt, "", "", DataViewRowState.ModifiedCurrent); for(int i = 0; i < dv.Count; ++i) Console.WriteLine(dv[i][0]);//.Row.RowState);

Loader.
Live Chat Icon For mobile
Up arrow icon