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

how can i catch TAB key

how can i catch TAB key in winform datagrid? which event? how?

1 Reply

AD Administrator Syncfusion Team October 9, 2002 07:47 AM UTC

I don't think you can catch the tabkey in an event. You can catch it by overriding ProcessDialogKey.
public class MyDataGrid : DataGrid
{
	protected override bool ProcessDialogKey(System.Windows.Forms.Keys keyData)
	{
		if(keyData == Keys.Tab)
		{
			Console.WriteLine("Keys.Tab");
			return true; //eat the key if this is what you want
		}
		return base.ProcessDialogKey(keyData);
	}
}
            

Loader.
Up arrow icon