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

Tab / enter key behavior with cell template controls

1 Answer 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 19 Nov 2010, 01:22 AM
I have a grid with a column whose CellTemplate is being set dynamically on each row via the CellTemplateSelector property of the column.  The cell will either be a checkbox, textbox, combobox, or datepicker.  The controls are showing correctly, and they are binding correctly.  However, when I tab into a cell in this column, I have to tab twice to actually be able to modify the data.  The first tab puts the cursor into the correct cell but not into the embedded control.  The second tab puts the cursor into the control.  Is there a way around this?

Also, is there a simple way to get the cell to respond to the Enter key after editing data in one of these controls (specifically the text box) rather than having to tab or click out of the cell?  I'm sure I could probably handle KeyUp or KeyDown events to make it work, but I was looking for a way to handle it within the XAML.

Thanks,
Ben

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 19 Nov 2010, 05:24 PM
Hi Ben,

Please try setting the EditTriggers="CellClick" property of that column (or the whole gridview)?

As for your second question - you can override the default keyboard behavior in gridview if you follow this help topic.

Hope this helps.

Greetings,
Veselin Vasilev
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Ben
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or