RadComboBox - how do i prevent the ComboBox from changing SelectedItem until i click on one ?

1 Answer 22 Views
ComboBox
Martin
Top achievements
Rank 1
Iron
Iron
Iron
Martin asked on 17 Jun 2021, 11:08 AM | edited on 17 Jun 2021, 11:13 AM

I'm using the ComboBox with the autocompleter / text enabled search. 

I want to prevent the ComboBox from changing Selected Item until I actually click on an item or press enter... 

Currently the RadComboBox changes the SelectedItem when browsing the elements (arrow up or down) which is not desired.

<telerik:RadComboBox Width="150"
                                 Height="25"
                                 Margin="115,10,0,0"
                                 HorizontalAlignment="Left"
                                 VerticalAlignment="Top"
                                 DisplayMemberPath="FabrikatNavn"
                                 IsEditable="True"
                                 IsEnabled="{Binding CanChangeVariant}"
                                 ItemsSource="{Binding Source={StaticResource SortedBrands}}"
                                 OpenDropDownOnFocus="True"
                                 SelectedItem="{Binding ElementName=root, Path=BrandModel.SelectedCarBrand}"
                                 StaysOpenOnEdit="True" />

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin
Top achievements
Rank 1
Iron
Iron
Iron
answered on 17 Jun 2021, 11:13 AM

UpdateSelectionOnLostFocus = true

seems to solve the issue . 

Tags
ComboBox
Asked by
Martin
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Martin
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or