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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

23467 Jan 12,2005 10:22 PM Jan 13,2005 07:34 AM Windows Forms 1
loading
Tags: GridControl
Anand
Asked On January 12, 2005 10:22 PM

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 ?

Administrator [Syncfusion]
Replied On 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);

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;