Pressing escape causes text to be highlighted on next key press

4 posts, 0 answers
  1. Christopher
    Christopher avatar
    2 posts
    Member since:
    Jul 2013

    Posted 12 Sep 2013 Link to this post


    I am using the IsFilteringEnabled functionality in the RadComboBox control to allow our users to filter on a list of items as they type.
    I have hooked up the KeyDown event in the code behind to set the IsDropDownOpen to true so the user can see the filtered items when they type. The functionality works well apart from an unexpected side effect:

    1. click in the combo box text box and start typing e.g. bb
    2. the drop down expands and shows available items matching bb as the user types
    3. press ESC button and the drop down closes and the cursor remains at the end of the bb text in the text box.
    4. when the user continues to type to add c at the end i.e. bbc I would expect the list of items to show only those containing bbc text. What actually happens is that the text bb is automatically highlighted and when the user types c the letters bb are erased and filter searches for items containing the letter c. This is unexpected.

    I would like stop this automatic text highlighting on a subsequent key press after pressing escape otherwise users will need to start their filter search from the beginning which is unnatural.




     <telerik:RadComboBox x:Name="comboBoxCpty"  Grid.Row="0" Grid.Column="1" ItemsSource="{Binding CptyList}" 
                        <VirtualizingStackPanel />

    Code Behind
    private void ComboBoxCpty_OnKeyDown (object sender, KeyEventArgs e)
                comboBoxCounterparty.IsDropDownOpen = true;
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 17 Sep 2013 Link to this post

    Hi Christopher,

    In order to support this scenario we have added new control - RadAutoCompleteBox. You can find more information about it in our documentation. Also I recommend you to take a look at our SDK Examples and particularly the NoMatchFilteringBehavior and OpenWithDropDownButton examples. I've used both of them to prepare a sample project for you, please find it attached and inform us in case you have any problems or concerns.

    Hopefully this helps.

    Rosen Vladimirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Chai Avisar
    Chai Avisar avatar
    5 posts
    Member since:
    Nov 2009

    Posted 16 Feb 2014 in reply to Rosen Vladimirov Link to this post

    I am using RasAutoCompleteBox, and am experiencing a related problem.
    After typing the first letter in the text box, the letter appears highlighted.
    Typing the next letter, overwrites that first letter.
    How do I avoid the first letter being highlighted?
    Thank you,
    Dina Mann
  5. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 19 Feb 2014 Link to this post

    Hi Dina Mann,

    I've tried to reproduce the issue, but without success. Could you give us more details on your scenario and RadAutoCompleteBox configuration? It will be great if you can open a new support thread and send us a sample project reproducing the issue.

    I'm looking forward to hearing from you.

    Rosen Vladimirov
Back to Top