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

RadComboBox and CanAutocompleteSelectItems

3 Answers 215 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Petter Forss
Top achievements
Rank 1
Petter Forss asked on 10 Oct 2012, 11:13 AM
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!

3 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 17 Oct 2012, 12:23 PM
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.

0
Petter Forss
Top achievements
Rank 1
answered on 17 Oct 2012, 12:48 PM
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.
0
Boyan
Telerik team
answered on 22 Oct 2012, 12:01 PM
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.

Tags
ComboBox
Asked by
Petter Forss
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Petter Forss
Top achievements
Rank 1
Share this question
or