using hotkey

Hi, I wan't to use the Hotkey on a cell, to select the neighboard cell. How can i do this? best regards JP Chetelat

1 Reply

AD Administrator Syncfusion Team June 10, 2003 06:50 AM UTC

One simple way to do it is to intercept teh hotkey at the form level, and handle it there. To do so, set this.KeyPreview = true; and handle the form's KeyDown event.
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
	if (e.KeyCode == Keys.F3) //F3 hotkey...
	{
		if(this.gridControl1.CurrentCell.HasCurrentCell)
		{
			this.gridControl1.CurrentCell.MoveRight(1);
			e.Handled = true;
		}
	}
}
To do something at the grid level, I think you would have to derive the grid and override ProcessDialogKey and catch the hotkey there and act on it.

Loader.
Up arrow icon