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


Sorry if I am asking a question thats already been asked (but I cannot find an answer). But, when I use a grid control, and create event handlers for for the CurrentCellKeyDown, CurrentCellKeyPress, and CurrentCellKeyUp, and type any keys (other than the arrow keys or backspace), only the CurrentCellKeyPress is called (the KeyUp and KeyDown do not get called as expected). For the the others keys (arrows or backspace), all handlers get called correctly. Is this a bug or do I need to do anything additional within grid control to capture these key events. Thanks, Vikram.

1 Reply

AD Administrator Syncfusion Team October 22, 2003 08:46 PM UTC

You can determine whether CurrentCellKeyUp and CurrentCellKeyDown is called through the CurrentCellControlKeyMessage event. Here is a handler that guarantees controlkey and shiftkey are passed to both CurrentCellKeyDown and CurrentCellKeyUp. You can modify it for the keys you want to catch there.
private void grid_CurrentCellControlKeyMessage(object sender, GridCurrentCellControlKeyMessageEventArgs e)
	Keys keyCode = (Keys) ((int)e.Msg.WParam) & Keys.KeyCode;
	if(keyCode == Keys.ShiftKey || keyCode == Keys.ControlKey)
		e.CallProcessKeyPreview = false;
		e.CallBaseProcessKeyMessage = false;

Live Chat Icon For mobile
Up arrow icon