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.

How to capture keydown event when a cell is in edit mode?

Thread ID:





55900 Feb 6,2007 01:34 PM Feb 8,2007 11:03 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On February 6, 2007 01:34 PM


Can someone please tell me how to capture keydown event when a cell is in edit mode.

I tried both gridGroupingControl1.TableControlCurrentCellKeyDown and gridGroupingControl1.TableControlKeyDown events, but they won't raise if a cell is in an edit mode. I need to know when a user presses F9 when he/she is in the middle of editing a cell.



Administrator [Syncfusion]
Replied On February 6, 2007 01:54 PM

Hi Frank,

You could use the TableControlCurrentCellControlKeyMessage event to capture the function keys:

this.gridGroupingControl1.TableControlCurrentCellControlKeyMessage +=new GridTableControlCurrentCellControlKeyMessageEventHandler(gridGroupingControl1_TableControlCurrentCellControlKeyMessage);

private void gridGroupingControl1_TableControlCurrentCellControlKeyMessage(object sender, GridTableControlCurrentCellControlKeyMessageEventArgs e)
Keys keyCode = (Keys)((int)e.Inner.Msg.WParam) & Keys.KeyCode;
if( keyCode == Keys.F9 )
MessageBox.Show("F9 Pressed....");

Best regards,

Administrator [Syncfusion]
Replied On February 8, 2007 11:03 AM

it works beautifullly. Thanks. Frank


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.