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

Tab order inside RadGridView

2 Answers 145 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Daniel Kassell
Top achievements
Rank 1
Daniel Kassell asked on 21 Sep 2011, 09:53 AM
Hi,

Is there a way the easily remove the tab index from cells in a grid view?

The problem I'm having is that I've made Cell templates with a control and when tabbing through the row I get focus on cells between the controls. When I have focus on one control inside a cell and hit tab I want to get focus on the control in the next cell and not the cell itself first. 

Here's some code:

<Controls3:RadGridView AutoGenerateColumns="False" CanUserInsertRows="True" IsFilteringAllowed="False" CanUserDeleteRows="True" CanUserReorderColumns="False" AutoExpandGroups="True" ShowInsertRow="True" ShowGroupPanel="False" RowIndicatorVisibility="Visible" EditTriggers="None" AddingNewDataItem="RadGridView_AddingNewDataItem">
            <Controls3:RadGridView.Columns>
                <Controls3:GridViewDataColumn EditTriggers="None" Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadComboBox IsEditable="True" TabIndex="1"/>
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
                <Controls3:GridViewDataColumn EditTriggers="None" Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadComboBox IsEditable="True" TextSearchMode="Contains" OpenDropDownOnFocus="True" DisplayMemberPath="Number" TabIndex="2"/>
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
                <Controls3:GridViewDataColumn EditTriggers="None" Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadComboBox IsEditable="True" TabIndex="3" />
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
                <Controls3:GridViewDataColumn Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadComboBox IsEditable="True" TabIndex="4" />
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
                <Controls3:GridViewDataColumn Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadNumericUpDown ShowButtons="False" IsInteger="False" ValueFormat="Numeric" TabIndex="5"/>
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
                <Controls3:GridViewDataColumn EditTriggers="None" Width="75">
                    <Controls3:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Controls2:RadNumericUpDown ShowButtons="False" IsInteger="False" ValueFormat="Numeric" TabIndex="6"/>
                        </DataTemplate>
                    </Controls3:GridViewDataColumn.CellTemplate>
                </Controls3:GridViewDataColumn>
            </Controls3:RadGridView.Columns>
        </Controls3:RadGridView>

So how can I achieve a scenario where a user has focus on the RadComboBox in the first cell and hits tab to get to the next RadComboBox without getting focus on its cell first?

2 Answers, 1 is accepted

Sort by
0
Daniel Kassell
Top achievements
Rank 1
answered on 21 Sep 2011, 10:35 AM
Solved it myself. CanUserSelect="false" did the trick for me.
0
Jayamma
Top achievements
Rank 1
answered on 01 May 2012, 07:55 PM
Nice solution, did good job for my project.
Tags
GridView
Asked by
Daniel Kassell
Top achievements
Rank 1
Answers by
Daniel Kassell
Top achievements
Rank 1
Jayamma
Top achievements
Rank 1
Share this question
or