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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

keypress event

Thread ID:

Created:

Updated:

Platform:

Replies:

30610 Jun 21,2005 09:02 AM UTC Jun 21,2005 10:25 AM UTC WinForms 1
loading
Tags: GridControl
Majesh Peedikakandy
Asked On June 21, 2005 09:02 AM UTC

hi, i have a grid where i need to do some action when i press ''enter'' in any cell.I can use CurrentCellKeyPress event.but due to some reason, when i press enter, the foccus goes from the current cell to another cell and the CurrentCellKeyPress event is not fired. Is there any other event that i can use ??

Administrator [Syncfusion]
Replied On June 21, 2005 10:25 AM UTC

If you do not want the Enter key to move the currentcell, you can set: this.gridControl1.EnterKeyBehavior = GridDirectionType.None; To catch the Enter key being pressed, you can use the grid.CurrentCellControlKeyMessage event.
private void grid_CurrentCellControlKeyMessage(object sender, GridCurrentCellControlKeyMessageEventArgs e)
{
	Keys keyCode = (Keys) ((int)e.Msg.WParam) & Keys.KeyCode;
	if(keyCode == Keys.Enter && e.Msg.Msg == 0x100) //WM_KEYDOWN
	{
		Console.WriteLine("WM_KEYDOWN->" + keyCode.ToString());
	}
}

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

;