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

[Solved] tab index problem

3 Answers 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
boris
Top achievements
Rank 1
boris asked on 28 Dec 2009, 08:40 AM
Hello,
I have implemented a custom header control that has textboxes inside for quick search.
When the first textbox inside first column has focus, I try to navigate with tab, and it works great, I can navigate through these textboxes.
The problem appears when I select a row in grid, then put a focus back on textbox. In that case, when I press tab, the cell in the selected row gets the next focus :(
Is there a way to manually reset the tab index or something like that?


P.S.  Happy Holidays :)

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 28 Dec 2009, 04:31 PM
Hi boris,

Can you please specify  is your custom header is placed inside the RadGridView or it is an external control .

I will try to find some descent solution for your problem .

All the best,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
boris
Top achievements
Rank 1
answered on 29 Dec 2009, 11:37 AM
Hi Pavel,  Thanks for your response :)
I have created a small demo that should explain the problem I am having
 ticket ID is : 269701


0
boris
Top achievements
Rank 1
answered on 30 Dec 2009, 12:47 PM
Hi again,
I solved this issue by handling the key down myself:

 void tb_KeyDown(object sender, KeyEventArgs e) 
        { 
            e.Handled = true
            if (e.Key == Key.Enter) 
            { 
               
            } 
            else if ((e.Key == Key.Tab&& Keyboard.Modifiers == ModifierKeys.None) || e.Key== Key.Right) 
            { 
                TabNavigate(sender, +1); 
               
            } 
            else if ((e.Key == Key.Tab && Keyboard.Modifiers == ModifierKeys.Shift) ||  e.Key == Key.Left) 
            { 
                TabNavigate(sender, -1); 
            } 
        } 

by setting the e.Handled, I've disabled the selected row from interfering.



Tags
GridView
Asked by
boris
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
boris
Top achievements
Rank 1
Share this question
or