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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Activating a Cell After A New Record is Added

Thread ID:





79519 Feb 12,2009 08:55 PM UTC Feb 13,2009 04:03 PM UTC WinForms 1
Tags: GridControl
Curtis Schlak
Asked On February 12, 2009 08:55 PM UTC

I have the SyncFusion Grouping Grid (v6.1.0.34) on a Form. When the user enters the "Add New Row" row, completes the information and hits the Enter key, a new "Add New Row" shows up at the top or bottom, depending on how I've configured the grid.

What I'd like is, after the commit of the new information to the object in the records, for the active cell to return to the first column of the "Add New Row" row.

How do I do this?

Rajadurai C [Syncfusion]
Replied On February 13, 2009 04:03 PM UTC

Hi Curt,

Thanks for your interest in Syncfusion products.

The focus can be set to the new addnew record first cell by handling TableControlCurrentCellEditingComplete and TableControlCurrentCellKeyDown event. Please refer to the following code.

bool b = false;
void gridGroupingControl1_TableControlCurrentCellEditingComplete(object sender, GridTableControlEventArgs e)
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
if (cc.RowIndex == 3)
b = true;

void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
if (e.Inner.KeyCode == Keys.Enter && b)
cc.MoveTo(3, 1, GridSetCurrentCellOptions.SetFocus);



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

or the page will be automatically redirected to 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