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.

Alternate event to SourceListListChanged event in gridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

32994 Aug 11,2005 02:52 AM Aug 11,2005 06:52 AM Windows Forms 3
loading
Tags: GridControl
Prathima Venkobachar
Asked On August 11, 2005 02:52 AM

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

Administrator [Syncfusion]
Replied On August 11, 2005 04: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); } }

Prathima Venkobachar
Replied On August 11, 2005 06:15 AM

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

Administrator [Syncfusion]
Replied On August 11, 2005 06: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);
	}
}

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.

;