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

Change cell movement direction

Is it possible for me to change the next cell that becomes enabled when a user hits tab within a grid.

Currently when a user hits tab within a grid, the next cell to the right of the current cell becomes the active cell. Can I make it so that the next cell is the cell below the current cell. Basically change the movement from left to right via rows to top to bottom via columns.

Thanks.

1 Reply

HA haneefm Syncfusion Team May 25, 2007 08:56 PM UTC

Hi Vik,

This is an expected behavior. But you can get the Tab key to behave like the Down key is to override the grid’s OnKeyDown, and change the Tab key to an Down key before calling the baseclass. Below is a code snippet.


public class MyGridControl: GridControl
{
protected override void OnKeyDown(KeyEventArgs e)
{
if( e.KeyCode == Keys.Tab && e.Modifiers == Keys.None)
e = new KeyEventArgs(Keys.Down);
base.OnKeyDown (e);
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon