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.
Unfortunately, activation email could not send to your email. Please try again.

Change cell movement direction

Thread ID:

Created:

Updated:

Platform:

Replies:

61470 May 25,2007 04:25 PM May 25,2007 04:56 PM Windows Forms 1
loading
Tags: GridControl
Vikram Bhavsar
Asked On May 25, 2007 04:25 PM

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.

haneefm [Syncfusion]
Replied On May 25, 2007 04:56 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;