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 get only updated rows from GGC Datagrid

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.

2 Replies

SA Salim Amin Padela December 9, 2005 02:15 PM UTC

>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.


AD Administrator 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);

Loader.
Live Chat Icon For mobile
Up arrow icon