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

TextFilterDescriptor

TextFilterDescriptor is a descriptor which filters by a property of type string.

Properties

  • PropertyName: Gets or sets the name of the property that is used to retrieve the value to filter by.
  • Operator: Gets or sets the TextOperator value that defines how the value member is compared with each value from the items source.
  • Value: Gets or sets the value used in the comparisons. This is the right operand of the comparison.
  • IsCaseSensitive: Gets or sets a value that determines whether the text comparisons will be case-sensitive. The default value is true.

Adding a TextFilterDescriptor

Example 1 demonstrates how to leave only the objects, whose Country property starts with "BR" (case-insensitive).

Example 1: Adding the RadDataGrid in xaml

<Grid xmlns:grid="using:Telerik.UI.Xaml.Controls.Grid" 
     xmlns:dataCore="using:Telerik.Data.Core"> 
    <grid:RadDataGrid x:Name="grid" Width="300" VerticalAlignment="Center"> 
        <grid:RadDataGrid.FilterDescriptors> 
            <dataCore:TextFilterDescriptor PropertyName="Country" 
                                Operator="StartsWith" 
                                IsCaseSensitive="False"  
                                Value="BR" /> 
        </grid:RadDataGrid.FilterDescriptors> 
    </grid:RadDataGrid> 
</Grid> 

The RadDataGrid is populated with data in the same manner as in Example 2 from the DelegateFilterDescriptor article.

Figure 1: RadDataGrid after filtering

TextFilterDescriptor example

See Also

In this article
Not finding the help you need?