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

Hi,

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.

Thanks,

Frank

2 Replies

AD Administrator Syncfusion Team February 6, 2007 06:54 PM UTC

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,
Haneef


AD Administrator Syncfusion Team February 8, 2007 04:03 PM UTC

it works beautifullly. Thanks. Frank

Loader.
Up arrow icon