The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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 ?
ADAdministrator Syncfusion Team January 13, 2005 12:34 PM UTC
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);