Tabbing through TextBoxes in a GridView

2 posts, 0 answers
  1. Todd Davis
    Todd Davis avatar
    36 posts
    Member since:
    Aug 2009

    Posted 22 Jul 2010 Link to this post

    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?
  2. Milan
    Milan avatar
    1989 posts

    Posted 23 Jul 2010 Link to this post

    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,
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top