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

RadCombobox KeyBoard

1 Answer 76 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexandre
Top achievements
Rank 1
Alexandre asked on 05 May 2008, 04:02 PM
Hi everyone, I'm curently writing a 100% keyboard application (of course you can use the mouse too but it's faster when you use the keyoard only) . My prolem is when I have more than 1 result to a query I need too show the result and let the user choice which one he want to use... But I use the SelectedItemChange Event to set something else. So when the user use the keyDown to move in the combobox that call the SelectedItemChange Event but I don't want this. With the VS Combobox I setted a boolean to true when the user pressed the keydown , but in the RadCombobox the keydown event comes before the SelectedItemChange Event so my way is impossible. If you can just show me an other way I would be happy.

Thanks and sorry for all english mistakes

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 07 May 2008, 03:39 PM
Hello Alexandre,

As far as I understand your scenario, you are actually using the SelectedIndexChanged event for a specific purpose and you would not like to execute the code in the event handler when the user changes the items using the Up/Down keys.

Indeed, unlike the standard MS combobox, the RadComboBox fires the SelectedIndexChanged before the KeyDown event. So, in your case, as a workaround I would suggest using the RadTextBoxItem.PreviewKeyDown event instead of setting the boolean flag. This event can be accessed as shown below:

this.radComboBox1.ComboBoxElement.TextBoxElement.TextBoxItem.PreviewKeyDown += new PreviewKeyDownEventHandler(TextBoxItem_PreviewKeyDown);

I hope this helps. If you have any additional questions, please don't hesitate to write us again.

Greetings,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or