CurrentRecordContextChange event

Hi, I have a grid grouping control, and I need to capture when the user moves to a different record. When this occurs, I need to use a value from the new record to do something else. Currently I am using the CurrentRecordContextChange event, which seems to work fine for detecting the change. The problem I''m having is that when I try to get one of the values from this new record, using ''gridGroupingControl1.Table.CurrentRecord.GetValue("COL1")'', none of the lines of code that follow this are executed. Is there a different/better way for me to do this? Thanks. Ross.

1 Reply

AD Administrator Syncfusion Team June 20, 2005 10:35 PM UTC

Try using the e.Record to get the GridRecord in that event.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
	if(e.Action == CurrentRecordAction.EnterRecordComplete && e.Record is GridRecord)
	{
		GridRecord rec = e.Record as GridRecord;
		Console.WriteLine(rec.GetValue("Name"));
	}
}

Loader.
Up arrow icon