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

Alternate event to SourceListListChanged event in gridGroupingControl

Hi Clay, I have a requirenment when the user moves from one row to other, I want to update row values to database. Currently I am using SourceListListChanged event. We are looking for performance improvement and observed this is costly as it raises in many a times. Kindly suggest some other event to do the same functionality. Thanks, Prathima

3 Replies

AD Administrator Syncfusion Team August 11, 2005 03:34 AM

You can catch when your user leaves a record using the CurrentRecordContextChange and checking the e.Action to pick out the leave. private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e) { if(e.Action == CurrentRecordAction.LeaveRecordComplete) { Console.WriteLine(e.Record); } }


PV Prathima Venkobachar August 11, 2005 05:15 AM

On this event can I make a check whether the row has been modified or not..? Thanks, Prathima


AD Administrator Syncfusion Team August 11, 2005 05:52 AM

You can try code similar to this.
private bool recordEdited = false;		
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
	if(e.Action == CurrentRecordAction.EndEditComplete)
	{
		recordEdited = true;
	}
	else if(e.Action == CurrentRecordAction.EnterRecordComplete)
	{
		recordEdited = false;	
	}
	else if(e.Action == CurrentRecordAction.LeaveRecordComplete)
	{
		if(recordEdited)
			Console.WriteLine(e.Record);
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon