Autocomplete open DropDown on Edit

5 posts, 0 answers
  1. Thilo
    Thilo avatar
    26 posts
    Member since:
    Feb 2011

    Posted 24 Jan 2014 Link to this post

    Hello !

    Is it possible to automaticly open the DropDown bei Beginning of Typing a searchcriteria in a as Autocomplete configured Combobox ?

    Scenario is MVVM.

    OpenDropDownOnFocus is not my prefered behaviour.

     I found that StaysOpenOnEdit doesn't work and are absolete.

  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 27 Jan 2014 Link to this post

    Hi Thilo,

    The StaysOpenOnEdit property works only if the drop down is open - it doesn't open the drop down itself. So if you need to have it open while typing you should set the OpenDropDownOnFocus property of the ComboBox to true as well. However I'm not sure if I have understood the question correctly, so please let me know if you have different requirement.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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. UI for WPF is Visual Studio 2017 Ready
  4. Thilo
    Thilo avatar
    26 posts
    Member since:
    Feb 2011

    Posted 27 Jan 2014 in reply to Kalin Link to this post

    Hallo Kalin,
    ​In my scenario the ComboBox is editable and shows the selected Item from the ItemsSource.
    The ComboBox is the First Control on an RadTabItem of a RadTabControl.
    And in this Scenario with OpenDropDownOnFocus="True" The Drop Down opens when i select the RadTabItem, because the ComboBox Control got the Focus.
    That is not what i wish.
    The user would only view the Data and not select anyone new.
    I want that only when the User Set the Focus in the ComboBox and begin to type some letters for searching the DropDown is automatically shown and list the filtered Data from ItemsSource.
    When i set OpenDropDownOnFocus="False" the Drop Down is not automatically shown when i type in some letters for searching.
  5. Thilo
    Thilo avatar
    26 posts
    Member since:
    Feb 2011

    Posted 29 Jan 2014 Link to this post

    Hello Kalin,
    see my attached Project  (rename jpg to zip)
    I want only open the DropDown automatically when the user begin Typing e.g. 00
  6. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 29 Jan 2014 Link to this post

    Hi Thilo,

    What I can suggest you to do in order to avoid that behavior is to just move the first RadMaskedTextInput above the ComboBox in the xaml keeping their Grid.Row and Grid.Column positions the same. This way the focus will go into the MaskedTextInput instead of the ComboBox and the controls will remain arranged the same way.

    However I would recommend you to use the AutoCompleteBox instead of the ComboBox in this case. You would be able to modify it in order to have similar appearance to the ComboBox by adding a drop down button - you can check the following example from our online XAML SDK repository which demonstrates the exact approach:
    https://github.com/telerik/xaml-sdk/tree/master/AutoCompleteBox/OpenWithDropDownButton

    If you also have some other requirements for the AutoCompleteBox, you can share them and we will point you the right direction in order to implement them.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready