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 the tab key in KeyDown event of Grid control

Any idea? I try all combination of WantKeys and WantTabKey but still have no luck.

2 Replies

AD Administrator Syncfusion Team October 13, 2005 01:04 PM UTC

To catch the tab key, you can derive teh grid and override ProcessCmdKey.
public class MyGridDataBoundGrid : GridDataBoundGrid
{
	protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
	{
		if(keyData == Keys.Tab)
		{
			//tab key pressed		}
		return base.ProcessCmdKey (ref msg, keyData);
	}
}


JO Joshua October 13, 2005 01:22 PM UTC

Thanks >To catch the tab key, you can derive teh grid and override ProcessCmdKey. >
>public class MyGridDataBoundGrid : GridDataBoundGrid
>{
>	protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
>	{
>		if(keyData == Keys.Tab)
>		{
>			//tab key pressed		}
>		return base.ProcessCmdKey (ref msg, keyData);
>	}
>}
>

Loader.
Live Chat Icon For mobile
Up arrow icon