This is a migrated thread and some comments may be shown as answers.

Tabbing through TextBoxes in a GridView

1 Answer 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Todd Davis
Top achievements
Rank 1
Todd Davis asked on 22 Jul 2010, 08:29 PM
We use a GridView in a form application. One part of the form has some questions that need to be filled in. The GridView has two columns - one column has the questions we need answered, and the other column has a TextBox where the answer is entered.

Generally speaking, this works fine, however our clients complain that it is difficult to navigate. They want to be able to fill in the the TextBox, then press the Tab key to tab down to the next TextBox and keep going.

First I tried using the RowLoading() event to modify each TextBox and give it a sequential TabIndex # and IsTabStop=True, however pressing the tab key still just goes back to tabbing through the various rows/cells and never actually enters the TextBox.

Then I tried some fancier logic, which iterates through all the TextBoxs in the Grid, finds the one you are on, and tries to set the Focus() to the next TextBox in the grid. I traced the code and everything I wrote is being called, it should work, but again, pressing tab just causes the Rows/Cells to highlight, and the TextBoxs never receive focus via the keyboard.

I can only assume that the GridView itself is somehow intercepting the tab presses and stealing the focus for it's own purposes. Is there a way to disable this, or get around it?

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 23 Jul 2010, 05:50 AM
Hello Todd Davis,

You can fine-tune the navigation behavior of RadGridView by creating a custom KeboardCommandProvider as demonstrated in this blog post

Do not hesitate to write if you have more questions.


Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Todd Davis
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or