Filter Panel

  • 3 minutes to read

The Filter Panel is displayed at the bottom of the PivotGridControl. This panel shows an existing filter expression (active or inactive) with a set of buttons to enable/disable, edit, or clear the filter.

Run Demo: Excel Style Filtering

API Description
PivotGridControl.ShowFilterPanelMode Specifies whether to display the filter panel within the PivotGridControl.
PivotGridControl.ShowFilterPanel Returns whether the filter panel is displayed within the PivotGridControl.

Note

The Filter Panel does not display summary filters.

Enable/Disable Filter

Use this check box to enable/disable the current filter at runtime.

API Description
PivotGridControl.IsFilterEnabled Specifies whether to enable/disable the current filter.

Filter Expression

If you apply filter conditions to individual columns, the PivotGridControl uses logical AND to combine these conditions into a single filter expression.

The Filter Panel highlights individual field names, field values, and date-time functions to increase the filter expression’s readability.

API Description
PivotGridControl.FilterString Gets or sets the filter expression applied to PivotGridControl data.
PivotGridControl.FilterCriteria Gets or sets the filter criteria applied to PivotGridControl data.

Expand/Collapse Panel

Click the Expand Panel button to display the entire filter expression if it does not fit the Filter Panel.

Most Recently Used Filters

Click the button displayed in the image below to access the most recently applied filter expressions.

API Description
PivotGridControl.AllowMRUFilterList Specifies whether to display the drop-down MRU filter list and the Most Resently Used button.
PivotGridControl.MRUFilterListCount Specifies the maximum number of the most recently used filters the PivotGridControl stores.
PivotGridControl.MRUFilterList Returns a collection of the most recently used filters.
PivotGridControl.AddMRUFilter Adds the specified filter to the collection of the most recently used filters.
PivotGridControl.RemoveMRUFilter Removes the specified filter from the collection of the most recently used filters.
PivotGridControl.ClearMRUFilter Clears the collection of the most recently used filters.

Edit Filter

The button shown in the image above invokes the Filter Editor:

pivot-filter-editor-new

API Description
PivotGridControl.AllowFilterEditor Specifies whether to allow users to invoke the Filter Editor from the header area’s context menu and Filter Panel.
PivotGridControl.ShowFilterEditor() Invokes the Filter Editor.

Clear Filter

The Clear Filter button at the end of the Filter Panel removes all the filter conditions.

Users can also remove individual conditions as shown in the image below:

API Description
PivotGridControl.ResetFilterCriteria() Clears the filter.

Legacy and New Filter Panels

To use the legacy Filter Panel (Prefilter Panel):

Note

The PivotGridControl bound to an OLAP Data Source displays the legacy Filter Panel.