Autocomplete feature : when i start typing in the combobox, it doesn't dropdown the options automatically

12 posts, 0 answers
  1. Todd Millett
    Todd Millett avatar
    115 posts
    Member since:
    Jul 2009

    Posted 11 Jan 2011 Link to this post

    I am using the combobox to achieve the autocomplete feature. As per the documentation i have set only the IsEnabled=true. Now in the datasource i have multiple items which have similar words like (Cooperation, Cooperatiove ...). Now when I start typing C, ideally it should display the first match in the combobox along with the rest of the matching items with 'C' in a dropdown kind of thing automatically.. but I am not able to see that. Can you please suggest, if I need to make any other changes.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 11 Jan 2011 Link to this post

    Hi Todd,

    Currently RadComboBox cannot open its dropdown automatically when the user starts typing inside. It only can open its dropdown when it gets the focus - just set OpenDropDownOnFocus = true.

    Kind regards,
    Valeri Hristov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Todd Millett
    Todd Millett avatar
    115 posts
    Member since:
    Jul 2009

    Posted 12 Jan 2011 Link to this post

    But even if i set that property, it does not filter the drop down when i type something. Is it mandatory to enable the filtering even for autocomplete?
  5. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 13 Jan 2011 Link to this post

    Hi Todd Millett,

    If you want to filter the items so only the items starting with letter "C" are showed, you have to set IsFilteringEnabled= true. If nothing is set the first item starting with letter C will be selected and autocomplete in the textbox but the other entries wont be filtered. You can check this configurator here and see if that behavior will suit you

    Kind regards,
    Boyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Todd Millett
    Todd Millett avatar
    115 posts
    Member since:
    Jul 2009

    Posted 23 Feb 2011 Link to this post

    I tried setting IsFilteringEnabled=True and OpenDropDownOnFocus = True. It works find when the user has the focus for the first time. Now take the scenerio : user focuses on the combobox, the drown down opens, now the user has the mouse cursor in the combobox. Without entering anything he clicks somewhere out of the combobox, so still the cursor is in the combobox. In this case again the drop down doesnt open. I even tried setting IsDropDownOpen = True in the GotFocus event of the combobox, but was not able to get the behaviour required. Can you please tell me how to achieve this.
  7. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 25 Feb 2011 Link to this post

    Hi Todd Millett,

    You can try to set IsDropDownOpen = True  in the KeyDown event of the RadComboBox. I think this will cover your scenario.

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


    Kind regards,
    Boyan
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. codputer
    codputer avatar
    45 posts
    Member since:
    Apr 2007

    Posted 13 Mar 2011 Link to this post

    I think I'm having a smiliar problem - let me if I can explain

    If i have the following list of elements:

    Adam
    Bev
    Charles
    Edmond

    In my combobox, when I type B, I would like to see autocomplete kick in and display "Bev", but right now it only displays B.

    IF I type B and then hit the tab - Bev does show up in the list.  I would like this  behaviour after just typing B without pressing tab, and of course, without leaving the field.

  9. George
    Admin
    George avatar
    1332 posts

    Posted 14 Mar 2011 Link to this post

    Hello, 


    Please, refer to the following links:

    I hope this helps.

    Kind regards,
    George
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  10. codputer
    codputer avatar
    45 posts
    Member since:
    Apr 2007

    Posted 14 Mar 2011 Link to this post

    I've reviewed the documentation extensively, and believe that I have an indication where things might be going wrong...

    The class that I'm binding to has a surrogate key, followed by a description.  ClaimTypeID, and ClaimType.  I've listed them here wtih SelectedValuePath, and DisplayMemberPath.  I think it is this translation that is not occuring after a keystroke that unique identifies an item in the list.

    The same behaviour that I am experiencing can be found using your demo by simply setting the IsFilteringEnabled = true. ( I've set my to false, but it had no visual effect.)  Set this attribute to true, clear the combobox, and type the first letter.  The correct item will be selected, but the enter word of the selection will not be displayed in the combobox until the user presses Tab.

    Also, I've never seen the telerik:TextSearch.TextPath - I'm going to look in the documentation for what that is for (I can guess but don't want to assume).


            <telerik:RadComboBox 
                    Grid.Column="1"
                    x:Name="cboClaimType"
                    CanAutocompleteSelectItems="True"
                    OpenDropDownOnFocus="False"
                    IsFilteringEnabled="False"
                    FilteringMode="StartsWith" 
                    IsEditable="True" 
                    IsReadOnly="True"
                    ItemsSource="{Binding LookUpQueryViewModel.ClaimTypes, Mode=OneWay, Source={StaticResource ViewModelLocatorDataSource}}"
                    DisplayMemberPath="ClaimType" 
                    SelectedValuePath="ClaimTypeID" 
                    HorizontalAlignment="Left" 
                    MinWidth="150"
                    Margin="5"
                    telerik:TextSearch.TextPath="ClaimType"
            />
     
  11. George
    Admin
    George avatar
    1332 posts

    Posted 17 Mar 2011 Link to this post

    Hello,

     
    When the filtering is enabled, the RadComboBox doesn't autocomplete. I would suggest you to set IsFilteringEnabled property to False.

    Best wishes,
    George
    the Telerik team
  12. Rohit
    Rohit avatar
    1 posts
    Member since:
    Jun 2015

    Posted 27 Jun 2015 Link to this post

    Hi,

       I am using Rad Combo Box , I want result will appear only when i  write to search in combo box, But currently it open directly when i just click on rad combo box.

    Please help me out.

    Regards

     

    Rohit Gupta

     

     

     

     

     

  13. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 01 Jul 2015 Link to this post

    Hi Rohit,

    RadComboBox's DropDown should not open automatically when you move the focus to it unless its OpenDropDownOnFocus property is set to True - please, set it to False in order to prevent it from opening when the control gets focused. If you want to open it as soon as a text is typed inside RadComboBox's TextBox you need to handle the KeyDown event of the control and set its IsDropDownOpen property to True:
    private void comboWindow2_KeyDown(object sender, KeyEventArgs e)
    {
        var combo = sender as RadComboBox;
     
        if (!combo.IsDropDownOpen)
        {
            combo.IsDropDownOpen = true;
        }
    }

    Please, give a try to the proposed above approaches and let us know if they worked for you.

    Hopes this helps.

    Regards,
    Nasko
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner