Skip to main content

Filter Elements

Filter Elements are separate controls within your application that can filter data in a bound PivotGridControl.


For an example, review our Demo Center application : Excel Style Filtering

Requires the installation of a WPF Subscription. Download

For element type information, review the Filter Element Types document section.

Add a Standalone Filter Element

  1. Add a filter element (the FilterElement class descendant) to the markup.
  2. Set the attached FilterElement.Context property to associate the filter element with the PivotGridControl‘s filter context.
  3. Assign the field name to the FilterElement.FieldName property.

The following code uses the CheckedListFilterElement to filter the PivotGridControl’s data by the fieldProductName values:

    dxfui:FilterElement.Context="{Binding FilteringContext, ElementName=pivotGridControl1}" 
    FieldName="fieldProductName" />

The image below shows the result:


Create a Custom Filter Drop-Down

  1. Create a data template that contains the FilterElement class descendant.
  2. Set the element’s Name to PART_FilterElement.
  3. Assign the data template to the PivotGridField.CustomExcelStyleFilterPopupTemplate property.

The following code snippet uses the CalendarFilterElement to filter the Order Date field values:

            <dxfui:CalendarFilterElement Name="PART_FilterElement" />

The image below shows the result:



The complete sample project How to Create a Custom Filter Drop-Down is available in the DevExpress Examples repository.