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

Tabbing out of a grid

I have a grid with 1 column and an adjacent large text box with rich text corresponding to the selected row in the grid. Using the currency manager of the grid I bind to the text box at the same time. I want the user to be able to hit tab to get from the grid to the main text box. I have managed to do this with ''Return'' but cant figure out how to do it with tab because Tab is a special key code or something. How can I intercept the tab key press correctly? -andy ------------------- private void gridNoteList_CurrentCellKeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Return || e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab) { SetFocusAtEndOfMainTextBox(); } }

1 Reply

AD Administrator Syncfusion Team April 4, 2004 01:12 PM UTC

Hi Andy, By default, the grid uses the tab key to move from cell to cell. But if you want the tab key to move from control to control on your form, then you can set the WantTabKey property. this.gridControl1.WantTabKey = false; If you want to capture the TAB key when the current cell is in edit mode, you have to overide either the ProcessCmdKey or ProcessDialogKey as shown in this KB article. http://www.syncfusion.com/Support/article.aspx?id=10441 Regards, Jay N

Loader.
Up arrow icon