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

Key Down Selection Broken

4 Answers 35 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 07 Jun 2010, 09:21 AM

Hello,

I have a problem with items not being selected when you use the keyboard to select them by choosing the first letter of the item's description.

You can replicate this on your demo site, so I won't bother posting any example code:
http://demos.telerik.com/silverlight/#ComboBox/FirstLook

How to replicate: Select BMW using the mouse, then hit the "A" key for Audi, now quickly hit the "O" key for Opel. It should still be on Audi even though you are expecting Opel. If that didn't work just keep jumping around between items quickly using the first letter of their description, you'll eventually hit the problem.

The strange thing is, if you leave a few seconds gap between selecting the next item, things are fine.

Regards,

James.

4 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 10 Jun 2010, 08:55 AM
Hi James,

Thank you for contacting us.

This behavior is by design. The ComboBox keeps the value of the pressed buttons for 500 milliseconds, so that the autocomplete can work properly. To achieve the desired behavior you can set the IsEditable property to True and IsReadOnly to True.
Hope this helps.

If you have further questions please let us know.

Best wishes,
Konstantina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
James
Top achievements
Rank 1
answered on 11 Jun 2010, 10:54 PM
Hi Konstantina,

I've tried your solution but it has not fixed the problem I'm experiencing.

Once an item is selected using the keyboard I am no longer able to use the keyboard to select another item.

If I select an item using the mouse, I am able to select the next item using the keyboard, but after that I'm stuck again, a second attempt to select an item using the keyboard does not work.

Here is my code:

        <InputControls:RadComboBox Width="100"   
                                   Height="22" 
                                   IsReadOnly="True"   
                                   IsEditable="True">  
            <InputControls:RadComboBoxItem Content="A" /> 
            <InputControls:RadComboBoxItem Content="B" /> 
            <InputControls:RadComboBoxItem Content="C" /> 
            <InputControls:RadComboBoxItem Content="D" /> 
            <InputControls:RadComboBoxItem Content="E" /> 
        </InputControls:RadComboBox> 

Any ideas?

Thanks for your help,
James.
0
Accepted
Boyan
Telerik team
answered on 14 Jun 2010, 11:53 AM
Hi James,

There is a way to change the time of 500 ms that Konstantina is talking about. Here is how you can change the time after which the value is cleared. Just set in the code behind:
TextSearch.AutoCompleteTimeout = new TimeSpan(0, 0, 0, 0, 1);
This will set this timeout to 1ms instead of 500. Now you will be able to select the items as fast as you wish and there is no need to change IsEditable property to True and IsReadOnly to True.

Let me know if you have further problems.

Sincerely yours,
Boyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
James
Top achievements
Rank 1
answered on 15 Jun 2010, 07:56 AM
Thanks, this has solved my problem.

James.
Tags
ComboBox
Asked by
James
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
James
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or