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.

New & Old values

Thread ID:

Created:

Updated:

Platform:

Replies:

57947 Mar 14,2007 10:00 AM Mar 14,2007 10:44 AM Windows Forms 1
loading
Tags: GridControl
Srdjan
Asked On March 14, 2007 10:00 AM

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.

Administrator [Syncfusion]
Replied On March 14, 2007 10:44 AM

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

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.

;