RadComboBox and CanAutocompleteSelectItems

4 posts, 0 answers
  1. Petter Forss
    Petter Forss avatar
    20 posts
    Member since:
    Oct 2009

    Posted 10 Oct 2012 Link to this post

    I'm using the following setttings on my combobox..

    <telerik:RadComboBox x:Name="cboUppdragsmallar" Text="{Binding Namn, UpdateSourceTrigger=LostFocus}" EmptyText="Uppdragsnamn" Height="40" FontSize="18"
                                                 DockPanel.Dock="Top" Margin="5 10 5 5" ToolTip="Uppdragsnamn" IsEditable="True" ItemsSource="{StaticResource UppdragsmallLista}" DisplayMemberPath="Namn"  CanAutocompleteSelectItems="False" SelectionChanged="cboUppdragsmallar_OnSelectionChanged" />

    My intention is to let the user pick a name for a project, if he wants he can use the dropdown to select a predefined template that lets picks some information of the template to fill certain fields.

    However the CanAutocompleteSelectItems does not seem to work because as soon as i type something in the dropdown it autocompletes and fired selectionchanged which fills all the fields with data from the template being selected.. I don't want this behaviour unless the user selectes an option from the dropdown by hand...

    So What i want is for the selectionchanged event only to fire when a dropdown selected is made by mouseclick or by keyboard. Not by autocompletion!

  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 17 Oct 2012 Link to this post

    Hello Petter,

    The CanAutocompleteSelectItems property works only when the dropdown is opened and you type. I tested it with the latest version of our controls and the SelectionChanged event was not triggered. However if the dropdown is closed autocompleting an item always select it.

    All the best,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Petter Forss
    Petter Forss avatar
    20 posts
    Member since:
    Oct 2009

    Posted 17 Oct 2012 Link to this post

    And what is the motivation behind that behaviour? Wouldn't it be good to have a property blocking the behaviour when the dropdown is closed aswell?

    In my application users can freely type in the dropdown if they want to, but seeing as telerik's autocomplete totally ruins that input since by just typing "r" it matches to any option containing r and autofills the box... Pretty useless in my oppinion.

    Luckily i found a workaround that simply checks if the dropdown is open or not when typing and cancels the selectionchanged if dropdown is not open while typing.
  5. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 22 Oct 2012 Link to this post

    Hello Petter,

    We are glad that you found a workaround that works for you. You can also try the new RadAutoCompleteBox control which I suppose will fit in your scenario.

    Kind regards,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top