Skip to main content
A newer version of this page is available. .

Lesson 6: Filter Data

Use the DataGridView.FilterExpression or DataGridView.FilterString property to specify a grid filter expression (it can consist of multiple conditions applied to multiple columns). When you apply a filter, a grid displays a subset of data records that meet the specified criteria.

Open the solution created in Lesson 5 and specify the filter expression for the grid.

<dxg:DataGridView x:Name="grid" ItemsSource="{Binding Orders}" 
                 CalculateCustomSummary="OnCalculateCustomSummary" 
                 SortMode="Multiple"
                 FilterString="Contains([Product.Name], 'Choco')">
    <!-- ... -->
</dxg:DataGridView>

Filter Data