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

Keyboard Events in CheckBox column

1 Answer 226 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 07 Jan 2010, 07:10 PM
I have a grid that could have as many as 3000 rows in it.  I have 5 ReadOnly columns and one CheckBox column that is enabled.  The user needs to:

  • move from record to record using the up/down keyboard arrows.
    • On moving up and down, the focus needs to remain on the CheckBox column.
    • User should have a visual queue which row and column is selected.  Currently, row is obvious; column is not.

 

  • press the spacebar to toggle the checkbox value to the next/other value.
    • I'm not convinced that putting a KeyDown event handler on the CheckBox is valid because it seems the keydown is actually on the cell that contains the CheckBox.

How can I accomplish this?

Grid:

                                <telerikGrid:RadGridView x:Name="equipmentGrid" Grid.Row="1"   
                                        AutoGenerateColumns="False" ShowGroupPanel="True">  
                                    <telerikGrid:RadGridView.Columns> 
                                        <telerikGrid:GridViewDataColumn Header="System"   
                                            DataMemberBinding="{Binding Root}" IsReadOnly="True"  /> 
                                        <telerikGrid:GridViewDataColumn Header="Area"   
                                            DataMemberBinding="{Binding Area}" IsReadOnly="True"  /> 
                                        <telerikGrid:GridViewDataColumn Header="Process Cell"   
                                            DataMemberBinding="{Binding ProcessCell}" IsReadOnly="True"  /> 
                                        <telerikGrid:GridViewDataColumn Header="Unit"   
                                            DataMemberBinding="{Binding Unit}" IsReadOnly="True"  /> 
                                        <telerikGrid:GridViewDataColumn Header="Module"   
                                            DataMemberBinding="{Binding Module}" IsReadOnly="True"  /> 
 
                                        <telerik:GridViewDataColumn     
                                            Header="Include" 
                                            IsCustomSortingEnabled="True"     
                                            IsFilterable="True">  
                                            <telerik:GridViewColumn.CellTemplate> 
                                                <DataTemplate> 
                                                    <CheckBox  
                                                        VerticalAlignment="Center"    
                                                        IsChecked="{Binding Path=IsChecked}"    
                                                    /> 
                                                </DataTemplate> 
                                            </telerik:GridViewColumn.CellTemplate> 
                                        </telerik:GridViewDataColumn> 
 
                                </telerikGrid:RadGridView.Columns> 
                            </telerikGrid:RadGridView> 

Note:  This is how the out-of-the-box CheckBoxColumn in the MS Grid works.

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 12 Jan 2010, 01:55 PM
Hi Joel Palmer,

We will add a special CheckBox column in our RadGridView, which will cover this requirement, with the next official release (2010.Q1). Meanwhile I'm attaching a sample project which demonstrates how to meet your goals by creating a custom column. Let me know how this works on your end.

Kind regards,
Nedyalko Nikolov
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.
Tags
GridView
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or