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

Cannot increase row count inside celleditcomplete handler

Thread ID:





1819 Nov 27,2002 05:52 PM UTC Dec 3,2002 11:26 AM UTC WinForms 2
Tags: GridControl
Darryl Mataya
Asked On November 27, 2002 05:52 PM UTC

We have a class inherited from Grid.Gridcontrol that automatically adds and removes rows based on other events. In one case, when we increase the rowcount (Me.RowCount +=1) it fails to do so. It actually appears to increase it immediately in the debugger, but once we leave the method the rowcount resorts to its prior value. In the case that does this, we are calling our add method that does this from within a handler for CurrentCellEditingComplete. Is this perhaps why the rowcount increase doesn't work here, and then of course what would be a good workaround?

Administrator [Syncfusion]
Replied On November 27, 2002 08:27 PM UTC

The problem is that in the CurrentCellEditingComplete event, the current cell is in the state of deactivating. This poses a problem if you try to increase the row count at this point, because that initiates another deactivating call. One work around available in Version 1.5 is to lock the currentcell while you increase the rowcount. This will avoid the second deactivating call.
private void gridControl1_CurrentCellEditingComplete(object sender, System.EventArgs e)
	GridCurrentCell cc = this.gridControl1.CurrentCell;

Darryl Mataya
Replied On December 3, 2002 11:26 AM UTC

That did it. Thanks Clay. -Darryl


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