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

Keyboard support Left/Right disable

2 Answers 118 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
YLS
Top achievements
Rank 1
YLS asked on 25 Feb 2013, 06:09 PM
Hello,

In the documentation, it says:
  • Up\Down - the Up and Down Arrow keys have two functions depending on the state of the dropdown:
    • When the dropdown of the RadComboBox is opened, then pressing Up\Down Arrows will change the highlighted item in the list.
    • When the dropdown of the RadComboBox is closed, then pressing Up\Down Arrows will change the SelectedItem.
  • Left\Right - the Left and RightArrow keys have the same functions as the Up and Down. However, they will affect the selected\highlighted item only when the RadComboBox is not editable (the IsEditable property is set to False).
 My  IsEditable is set to False. However this will enable Left\Right key to cycle through the items instead of going to the next cell (I put this ComboBox in a DataGrid).
Is there any way that I can disable the Left\Right key function in a ComboBox so it only goes to cell on its left or right side?  There is an alternate way to do so: IsEditable = False, IsReadOnly = True; but I don't really feel good about this. Any suggestions? Thanks, Yala

2 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 28 Feb 2013, 01:11 PM
Hi Yala,

Since the ComboBox handles the KeyDown event, I could suggest you to inherit from the RadComboBox and override the HandleKeyDown. In that way you could remove the functionality of the Left and Right arrow key changing the selected item.

Greetings,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
YLS
Top achievements
Rank 1
answered on 28 Feb 2013, 04:38 PM
Hi Konstantina,

Thank you for your reply, it works well.

I also found this that helps: http://www.telerik.com/community/forums/silverlight/gridview/keyboard-navigation-on-a-column-that-may-have-combobox-or-textbox.aspx



Thanks,
Yala
Tags
ComboBox
Asked by
YLS
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
YLS
Top achievements
Rank 1
Share this question
or