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

Text Filtering and item Selection

3 Answers 299 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Joseph LeBlanc
Top achievements
Rank 1
Joseph LeBlanc asked on 25 Aug 2010, 06:29 PM
I'm using a RadComboBox with text filtering, it works fine except for one small case.

When I start typing into the combo box to filter its items, if I use the keyboard to highlight and press enter on an item, the text that I typed will be replaced with the complete text of the item that I selected. This does not happen though in a particular case. If I partially type in the text of an item and then use the mouse to click on the item I want in the resulting filtered list, the text in the combo box will remain the partially typed in value that I entered, instead of being replaced with the complete text from the item I selected.

How do I get the combo box to behave the same in both cases (mouse & keyboard) so that the text of the selected item always replaces the text the user typed in?

Here's how I'm setting up my combo box in case I'm simply lacking a proper setting. I was able to duplicate this behavior on the Telerik online demo's page.

            <telerik:RadComboBox Grid.Column="1" Grid.Row="1" Margin="5,1,5,1"
                                 ItemsSource="{Binding AvailableLookupGroups}" 
                                 SelectedValue="{Binding LookupGroup, Mode=TwoWay}" 
                                 CanAutocompleteSelectItems="True"
                                 CanKeyboardNavigationSelectItems="True"
                                 IsEditable="True"
                                 IsFilteringEnabled="True"
                                 TextSearchMode="Contains"
                                 EmptyText="Select a lookup..."
                                 OpenDropDownOnFocus="True"
                                 ClearSelectionButtonVisibility="Visible"
                                 ClearSelectionButtonContent="Clear"
                                 DisplayMemberPath="LookupName"/>

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 30 Aug 2010, 09:54 AM
Hi Joseph,

Thank you for contacting us.

This is by design. When an item is selected and the ComboBox is in editable mode, you can enter in the TextBox a text that does not exist in the ComboBox. That is why it does not completes the selected item in the TextBox, as it is not sure if it should leave the uncompleted text or the selected one. If you set the IsReadOnly property to True it will work as you expect.

Hope this clarifies a bit the case. If you have any other questions please feel free to contact us again.

Sincerely yours,
Konstantina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Joseph LeBlanc
Top achievements
Rank 1
answered on 03 Sep 2010, 10:01 PM
Thanks, now I have another issue.

I'm binding the SelectedValue of the RadComboBox to a dependency property on my backing view model object. This works fine when I use the combo box to make an initial selection of what the value should be, however when I re-load my application the view model, now having a value, does not have that value show up as the selected value in the combo box. The combo box remains blank as if no value is selected, even though the property it is bound to does in fact have a value.

Here's how I'm using the combo box, any idea's?

            <telerik:RadComboBox Grid.Column="1" Grid.Row="1" Margin="5,1,5,1"
                                 ItemsSource="{Binding AvailableLookupGroups}" 
                                 SelectedValue="{Binding LookupGroup, Mode=TwoWay}" 
                                 CanAutocompleteSelectItems="True"
                                 CanKeyboardNavigationSelectItems="True"
                                 IsEditable="True"
                                 IsReadOnly="True"
                                 IsFilteringEnabled="True"
                                 TextSearchMode="Contains"
                                 EmptyText="Select a lookup..."
                                 OpenDropDownOnFocus="True"
                                 ClearSelectionButtonVisibility="Visible"
                                 ClearSelectionButtonContent="Clear"
                                 DisplayMemberPath="LookupName"/>
0
Konstantina
Telerik team
answered on 07 Sep 2010, 04:22 PM
Hello Joseph,

Thank you for your reply.

Have you implemented the PropertyChanged? If yes, could you please try to replicate the issue in a small sample project and send it to us. In that way we will be able to assist you in the best manner.

Looking forward to your reply.

Sincerely yours,
Konstantina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Joseph LeBlanc
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Joseph LeBlanc
Top achievements
Rank 1
Share this question
or