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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl: Strange behavior.

Thread ID:





15776 Jun 28,2004 07:17 AM UTC Jun 28,2004 08:38 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On June 28, 2004 07:17 AM UTC

Hello. I using GridGrouingControl. I need some workaround when new row added. Your team provide me next code: private void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e) { Element el = this.gridGroupingControl1.TableControl.Table.CurrentElement; if(el != null && el is GridAddNewRecord) { this.gridGroupingControl1.Table.AddNew(); Record r = el as Record; // Do something } } But it occured anytime I start to edit cell from this row. Actually I should handle only once, when start to edit new row. Is it possible ? Thanks. Vadim.

Administrator [Syncfusion]
Replied On June 28, 2004 08:38 AM UTC

You can try setting a flag so your code is only hit once per new row. To reset it, you can handle the TableControlCurrentCellMoving.
private bool doOncePerNewRow = true;
private void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
	Element el = e.TableControl.Table.CurrentElement;
	if(doOncePerNewRow && el != null && el is GridAddNewRecord)
		doOncePerNewRow = false;
		Record r = el as Record;

private void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
	if(e.TableControl.CurrentCell.MoveToRowIndex != e.TableControl.CurrentCell.MoveFromRowIndex)
		doOncePerNewRow = true;


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon