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.
I am new to this Grouping Grid Control. I am binding a IList to the grid and i want to retrieve only updated values from that grid.
Please tell me how to do that.
Thanks in advance.
Salim.
>I am new to this Grouping Grid Control. I am binding a IList to the grid and i want to retrieve only updated records from that grid.
>
>Please tell me how to do that.
>
>Thanks in advance.
>
>Salim.
ADAdministrator Syncfusion Team December 9, 2005 03:56 PM UTC
If you have an arbitrary IList as a DataSource, the GridGroupingControl will have no way of knowing when a value in your datasource is changed outside of the grid. So, if those are teh kind of changes you are interested in, then the grid would be of on help to you.
If your IList object is an IBindingList, then you can track what rows have changed by listening to the IBindingList.ListChanged event.
If you want to get the values that are modified by your user inside the grid, then there are several ways to do this (event if the DataSource is not an IBindingList). One way to do this is to subscribe to the TableControlCurrentCellValidating event. This will only be raised when your user modifies a cell. But the grid does not maintain a cache of modified rows. If you need this, then you would have to maintain a datastore for the rows that are handled in TableControlCurrentCellValidating. Inside that event you can use code like this to get the record you that is being modified.
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(cc.RowIndex, cc.ColIndex);
Console.WriteLine(style.TableCellIdentity.DisplayElement.ParentRecord);