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

using hotkey

Thread ID:

Created:

Updated:

Platform:

Replies:

4939 Jun 10,2003 05:15 AM UTC Jun 10,2003 06:50 AM UTC Windows Forms 1
loading
Tags: GridControl
Asked On June 10, 2003 05:15 AM UTC

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

Administrator [Syncfusion]
Replied On 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.

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

;