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

Tab to cell control

3 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 11 May 2011, 09:21 AM
Hi!
I have a grid, that contains some cells with controls in them - drop down, text box and so on.

The issue is that when I start to edit one cell, and tab to the next, and that cell contains a control. It will then tab to the cell not the control which will create a very odd scenario for the user. Is it possible to set it to tab to the control instead somehow?

<telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn UniqueName="ProductCode" Width="150" DataMemberBinding="{Binding Task.ProductCode}" IsGroupable="False">
                    <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="Delivery Item (Task Product-doc nr)"
                                       TextWrapping="Wrap" MaxHeight="50"/>
                    </telerik:GridViewDataColumn.Header>
 
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn UniqueName="Task.Description" Header="Description" IsGroupable="False" TextWrapping="Wrap" Width="250">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <TextBox AcceptsReturn="True" MinWidth="150" TextWrapping="Wrap" TabIndex="0" IsReadOnly="{Binding IsReadOnly}" Text="{Binding Task.Description, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
 
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn UniqueName="SelectedDepartment.Name" SortMemberPath="Name" IsGroupable="False"
                                             Width="100">
                    <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="Responsible Department"
                                       TextWrapping="Wrap" MaxHeight="50"/>
                    </telerik:GridViewDataColumn.Header>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox ItemsSource="{Binding DepartmentEntities}" IsEnabled="{Binding IsEnabled}" SelectedValuePath="Id" DisplayMemberPath="Name"  SelectedItem="{Binding SelectedDepartment, Mode=TwoWay}">
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 11 May 2011, 09:25 AM
Hello John,

 
You may take a look at the following forum thread for further info.


Best wishes,
Vanya Pavlova
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
0
John
Top achievements
Rank 1
answered on 11 May 2011, 09:30 AM
Sorry, but that's not my issue...
If I'm editing the value in the a textbox, and tab to the next cell where there is a dropdown, the dropdown control will go away and it will try to edit the cell itself, not the control in the cell.
0
Vanya Pavlova
Telerik team
answered on 11 May 2011, 10:05 AM
Hello John,


In this case, you can either keep to your current solution, or use a custom CellTemplate (not CellEditTemplate) to display a TextBlock with a small graphical hint. By default, when not in edit mode, the ComboBox (defined in the CellEditTemplate) displays its value in a TextBlock - the ComboBox is shown when entering edit mode.
Furthermore you may use our ComboBoxColumn, you may read more about this here.


Kind regards,
Vanya Pavlova
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
John
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
John
Top achievements
Rank 1
Share this question
or