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.
Syncfusion Feedback

Getting Focus on FirstCell of AddNewRecord

Thread ID:

Created:

Updated:

Platform:

Replies:

57732 Mar 9,2007 01:29 PM UTC Mar 9,2007 03:06 PM UTC Windows Forms 1
loading
Tags: GridControl
de
Asked On March 9, 2007 01:29 PM UTC

Hi,

I am using GGC. I want to set focus on firstCell of the AddNewRecord when some special keys are pressed. Thanks in advance.

DKP

Administrator [Syncfusion]
Replied On March 9, 2007 03:06 PM UTC

Hi DKP,

You can handle the CurrentCellKeyDown event of the Grid and call the Table.AddNew method to navigate cell focus to add new record in a GridTable. Here is a sample code snippet to show this.

private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
if( e.Inner.KeyData == Keys.F2)
{
e.TableControl.Table.AddNew();
e.TableControl.Table.AddNewRecord.SetCurrent("FirstColumnName");
}
}

Best regards,
Haneef

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.

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

;