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. Image for the cookie policy date

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 02:50 AM

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.
Live Chat Icon For mobile
Up arrow icon