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
close icon

Capturing all cell keydown events

Hi I need to capture all keypresses that occur within a cell (so I can handle tab presses) The closest thing I've found is the CurrentCellKeyDown event, but this doesn't get fired when the cell is actually in edit mode. Is there any way to do this? Thanks Martin

1 Reply

AD Administrator Syncfusion Team July 3, 2003 07:55 AM UTC

We are looking into the behavior of CurrentCellKeyDown right now. Not sure how what will be done will affect the tab key since that is a special key. In any case, if you want to catch all tab keys in the grid whether or not a cell is being edited, you can derive the grid and override ProcessCmdKey.
public class MyGridControl : GridControl
	protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
		if(keyData == Keys.Tab)
			Console.WriteLine("Got a tab");
		return base.ProcessCmdKey(ref msg, keyData);

Live Chat Icon For mobile
Up arrow icon