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

GridViewComboBoxColumn editing mode question

5 Answers 195 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 14 Nov 2012, 11:02 PM
I have a GridViewComboBoxColumn in my grid. My desired behavior is that when I use arrow keys to move to a cell in the comboBoxColumn and start typing the combo box starts selecting the matching value. However, right now the first letter I type seems to put the combo box into editing mode, and the second time I type that letter it actually selects the item.

So for example: if the combo box has "alex", "ben", "charlie" in it, when i first type "a" the cell goes into editing mode (unselected combo box appears) and when I type "a" again, "alex" actually becomes the selected value. I want "alex" to become selected the first time I type "a".

Thanks.

5 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 15 Nov 2012, 03:49 PM
Hi Alex,

 
In order to achieve your goal, you can set the EditTriggers property of RadGridView to CellClick. You can check this help article for reference.

Let me know if this works for you! 

All the best,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alex
Top achievements
Rank 1
answered on 15 Nov 2012, 04:08 PM
My issue isn't really with clicking, its more of when I get into the cell with the arrow keys and then start typing.

Even with setting the to EditTriggers="CellClick, TextInput, F2" and OpenDropDownOnFocus the example from my first post doesn't quite work correctly. I don't want the drop down to just open, I want the first value from the combo box starting with "a" to be selected after the first time I type "a" in my comboboxcolumn.


0
Yoan
Telerik team
answered on 20 Nov 2012, 12:33 PM
Hi Alex,


In order to achieve your goal, you can subscribe to the CurrentCellChanged event and execute the BeginEdit method when the current cell is not null. For your convenience I have prepared a sample project for you. You can find it attached.

Please give it a try and let me know if you need more help.


All the best,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alex
Top achievements
Rank 1
answered on 20 Nov 2012, 04:04 PM
This is close, but not quite what I'm looking for. In the example you have provided the GridViewComboBoxColumn goes into editing mode the second you go into the cell. I want it to start editing when I start typing.

Thanks,
Alex
0
Accepted
Yoan
Telerik team
answered on 23 Nov 2012, 01:52 PM
Hello Alex,

I am happy to inform you that, we have changed the ComboBoxColumn's behaviour. Now it will go into edit mode the first time when you start typing. The change will be available with our Q3 SP1 release. It is scheduled to be released next week. 

Don't hesitate to contact us if you have other questions.

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Alex
Top achievements
Rank 1
Share this question
or