New to Telerik UI for WPF? Download free 30-day trial

Search As You Type

RadMultiColumnComboBox allows you to filter the data of the RadGridView control that is present in its drop-down menu. This is done via the input box of the RadMultiColumnComboBox control.

The default searching behavior has two ways of setting the operator of the filtering criteria. This will depend on the value type of the property, over which the search is performed. For a string and Enum type the operator is set to Contains. For all other types, the operator is set to IsEqualTo.

RadMultiColumnComboBox with a performed search

RadMultiColumnComboBox with a perfomed search

Modify the Searching Criteria

In order to modify the search behavior, you can benefit from the following three search operators:

  • +—The items that will pass the filtering operation will have to contain both the value before the operator and the one after it.

    Using the + search operatior

    RadMultiColumnComboBox with plus search operator

  • -—All items that will pass the filtering operation will have to contain the value before the operator, but not the one after it.

    Using the - search operatior

    RadMultiColumnComboBox with minus search operator

  • ""—When a word or a phrase is put in quotes, the filtered objects will contain only the exact same value.

    Using the "" search operator

    RadMultiColumnComboBox with quotes search operator

Search Mode

The RadMultiColumnComboBox control exposes the SearchMode property, which allows you to control how items are matched when a search is executed.

This property exposes two possible values:

  • MatchAnyTerm—Items match the search operation when they fulfill any of the search terms. For example, if Liverpool Arsenal is inputted in the search panel, items containing any of the terms "Liverpool" and "Arsenal" in any of their properties will be matched. This is the default value.

  • MatchAllTerms—Items match the search operation only when they fulfill all of the search terms. Continuing with the previous example, if Liverpool Arsenal is entered as the search text, only items that contain both terms ("Liverpool" and "Arsenal") in any of their properties will be matched.

  • MatchExact—Items match the search operation only when they exactly match the search text. When this mode is selected the append provider won't append text. This option is available with the 2023 R2 release of Telerik UI for WPF and versions above it.

Search in Hidden Columns

RadMultiComboBox allows you to search in hidden columns. To do so, set the CanUserSearchInHiddenColumns property to True of the GridViewItemsSourceProvider instance.

Enable searching in hidden columns

<telerik:RadMultiColumnComboBox> 
    <telerik:RadMultiColumnComboBox.ItemsSourceProvider> 
        <telerik:GridViewItemsSourceProvider ItemsSource="{Binding Clubs}"  
                                             AutoGenerateColumns="False"  
                                             CanUserSearchInHiddenColumns="True"> 
            <telerik:GridViewItemsSourceProvider.Columns> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" IsVisible="False"/> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"/> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"/> 
            </telerik:GridViewItemsSourceProvider.Columns> 
        </telerik:GridViewItemsSourceProvider> 
    </telerik:RadMultiColumnComboBox.ItemsSourceProvider> 
</telerik:RadMultiColumnComboBox> 
RadMultiColumnComboBox search in a hidden column

RadMultiColumnComboBox search in a hidden column

SearchStateManager

The RadMultiColumnComboBox exposes the SearchStateManager property, through which the search functionality can be customized.

The SearchStateManager property is of the type SearchStateManager and this class exposes the following properties:

  • MatchCase—Allows you to control if the text matching will be case sensitive.
  • IsSearchWithAccentEnabled—Allows you to specify if the search will be accent sensitive.
  • HighlightMatches—Allows you to control if the matched items will be highlighted.
  • AutoCompleteMode—Allows you to specify the auto-complete mode of the input box. This property is of the type SearchAutoCompleteMode, which is an enumeration and exposes the following options:
    • Suggest—Items are filtered, text is not auto-completed. String are filtered by StartsWith operator.
    • Append—Items are not filtered, text is auto-completed. String are filtered by StartsWith operator.
    • SuggestAppend—Items are filtered, text is auto-completed. String are filtered by StartsWith operator. This is the default value of the AutoCompleteMode property.
    • Search—Items are filtered, text is not auto-completed. String are filtered by Contains operator. Complex clause searches are supported (Like RadGridView search as you type).

Disabling the highlighting effect on matched items

this.radMultiColumnComboBox.SearchStateManager.HighlightMatches = false; 
Me.radMultiColumnComboBox.SearchStateManager.HighlightMatches = False 

RadMultiColumnComboBox without highlighting on matched items

RadMultiColumnComboBox without highlighting on matched items

See Also

In this article