Text Filtering and item Selection

4 posts, 0 answers
  1. Joseph LeBlanc
    Joseph LeBlanc avatar
    5 posts
    Member since:
    Sep 2009

    Posted 25 Aug 2010 Link to this post

    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"/>

  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 30 Aug 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joseph LeBlanc
    Joseph LeBlanc avatar
    5 posts
    Member since:
    Sep 2009

    Posted 03 Sep 2010 Link to this post

    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"/>
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 07 Sep 2010 Link to this post

    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
Back to Top