In This Topic
    Using a filter row
    In This Topic

    The following example demonstrates how to add a FilterRow to the fixed headers of a grid's view that will allow the data items in the grid to be filtered according to the user-specified filter criteria.

    XAML
    Copy Code
    <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
      <Grid.Resources>
         <xcdg:DataGridCollectionViewSource x:Key="cvs_products"
                                            Source="{Binding Source={x:Static Application.Current}, Path=Orders}" />
      </Grid.Resources>
      <xcdg:DataGridControl x:Name="OrdersGrid"
                            ItemsSource="{Binding Source={StaticResource cvs_products}}">
         <xcdg:DataGridControl.View>
            <xcdg:TableView>
              <xcdg:TableView.FixedHeaders>
                 <DataTemplate>
                    <xcdg:FilterRow Background="Pink" />
                 </DataTemplate>
              </xcdg:TableView.FixedHeaders>
            </xcdg:TableView>
         </xcdg:DataGridControl.View>
      </xcdg:DataGridControl>
    </Grid>