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

New & Old values

Hi.

Question: In CurrentRecordContextChange event of GGC control and EndEditCalled action is it possible to get old values? If user replaces some data I need to know previous values. Is it possible?

GGC control is getting data from DataTable.

Thanks.

1 Reply

AD Administrator Syncfusion Team March 14, 2007 02:44 PM UTC

Hi Srdjan,

You can use the Table.ChangedFieldsArray collection property to detect changes in the datasource when the ListChanged event is called. Here is a code snippet to show this.

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if( e.Action == CurrentRecordAction.EndEditCalled )
{
Record rec = e.Record as Record;
if( rec != null)
{
foreach(ChangedFieldInfo fInfo in e.Table.ChangedFieldsArray )
Console.WriteLine( " ColumnName = {0}: OldValue:{1} => NewValue:{2}", fInfo.Name, fInfo.OldValue, fInfo.NewValue);
}
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon