RadComboBox - Incorrect Autocomplete filtering when using VirtualizingStackPanel

2 posts, 0 answers
  1. Karl Farrand
    Karl Farrand avatar
    10 posts
    Member since:
    Oct 2006

    Posted 29 Mar 2013 Link to this post

    Hi,

    I am using a RadComboBox to select an item from a long, dynamic list (potentially several thousand).
    NB: The RadComboBox is being used inside a RadGridView, using GridViewDataColumn.CellEditTemplate

    For performance I have had to use the ComboBox Virtualiztion as described here
    However when I use Virtulization the AutoComplete filtering gives me a incorrect list. As per the screenshots below.

    Without Virtulization I get the correct filtering as shown in the attached image radcomboboxworks.png
    When I type in 'John' only the four correct results show in the dropdown.
    The code for this is here:

    <telerik:RadComboBox 
        IsFilteringEnabled="True"
        TextSearchMode="Contains"
        CanAutocompleteSelectItems="True" 
        CanKeyboardNavigationSelectItems="True"
        IsEditable="True"
        OpenDropDownOnFocus="True"
        DisplayMemberPath="FullNameAndEmployeeId"
        SelectedItem="{Binding Employee, Mode=TwoWay}"
            telerik:TextSearch.TextPath="FullNameAndEmployeeId"
        ItemsSource="{Binding EmployeeList, Source={StaticResource EmployeeDataList}}">
    </telerik:RadComboBox>


    When I add virtualisation I get some expected items followed by a number of  additional items. To make it more odd these extra items seem to be random and will change if I retype 'John'
    The code for this is here:

    <telerik:RadComboBox 
         IsFilteringEnabled="True"
         TextSearchMode="Contains"
         CanAutocompleteSelectItems="True" 
         CanKeyboardNavigationSelectItems="True"
         IsEditable="True"
         OpenDropDownOnFocus="True"
         DisplayMemberPath="FullNameAndEmployeeId"
         SelectedItem="{Binding Employee, Mode=TwoWay}"
            telerik:TextSearch.TextPath="FullNameAndEmployeeId"
         ItemsSource="{Binding EmployeeList, Source={StaticResource EmployeeDataList}}">
         <telerik:RadComboBox.ItemsPanel>
         <ItemsPanelTemplate>
         <VirtualizingStackPanel />
         </ItemsPanelTemplate>
         </telerik:RadComboBox.ItemsPanel>

    </telerik:RadComboBox>


    Any ideas on why this filtering behaviour is different and how to make it filter correctly when using virtualization?

    Thanks
    Karl

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 02 Apr 2013 Link to this post

    Hello Karl,

    I am afraid that you cannot use filtering and virtualization features of RadComboBox at the same time. We are aware of this limitation but since the ComboBox is ItemsControl, this behavior cannot be changed.

    However,  I would suggest to check our new RadAutoCompleteBox control, it seems suitable to your scenario. You can find its demos here and documentation here.

    All the best,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top