EnumStringFilterOperator
Defines how text filtering operations match user input against dropdown item text values. Controls the search strategy when users type to filter dropdown options, affecting both user experience and performance.
Definition
Namespace:Telerik.Blazor
Assembly:Telerik.Blazor.dll
Syntax:
public enum StringFilterOperator
Fields
Contains
Matches items where the text contains the user's input anywhere within the string, providing the most flexible search experience. Best for large, unsorted datasets where users might search by any part of the item name or description. Allows finding items even when users don't know the exact beginning, making it very user-friendly for diverse content. Slightly slower than StartsWith but essential for comprehensive search functionality in complex dropdowns.
DoesNotContain
Matches items where the text does not contain the user's input, providing exclusion-based filtering. Enables users to filter out items by typing what they want to exclude rather than what they want to include. Useful for advanced filtering scenarios where users want to remove certain categories or types from their view. Less intuitive for most users but powerful for complex data exploration and elimination-based search workflows.
EndsWith
Matches items where the text ends with the user's input, useful for finding items by suffix or code endings. Helpful for datasets organized by suffixes, file extensions, product codes ending in specific patterns, or postal codes. Less common but valuable for specialized use cases like finding items by classification codes or identifier endings. Performance is similar to StartsWith but may feel less intuitive to users for general text search scenarios.
IsContainedIn
Matches items where the user's input contains the item text, essentially reversing the typical search direction. Useful for specialized scenarios like tag filtering where you want to find all tags contained within a longer search term. Less common in typical dropdown scenarios but valuable for advanced filtering logic and tag-based searches. Consider carefully whether this matches your users' mental model of how search should work in your application.
StartsWith
Matches items where the text begins with the user's input, providing predictable and fast filtering. Most intuitive for alphabetically sorted lists where users expect to type the beginning of their desired item. Fastest filtering operation since it can leverage string indexing and early termination optimizations. Ideal for name lists, categories, countries, or any data where users typically know the starting characters.