Skip to main content

Filter Panel

  • 3 minutes to read

The Filter Panel is displayed at the bottom of the GridControl. 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
DataViewBase.ShowFilterPanelMode Specifies whether to display the filter panel within a View.

Enable/Disable Filter

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

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

Filter Expression

If you apply filter conditions to individual columns, the GridControl 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
DataControlBase.FilterString Gets or sets the filter expression applied to GridControl data.
DataControlBase.FilterCriteria Gets or sets the filter criteria applied to GridControl data.
DataControlBase.FixedFilter Specifies the filter criteria that is always applied to GridControl data and cannot be modified by the user.

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
DataControlBase.AllowMRUFilterList Specifies whether to display the drop-down MRU filter list and the Most Resently Used button.
DataControlBase.MRUFilterListCount Specifies the maximum number of the most recently used filters the View stores.
DataControlBase.MRUFilterList Returns a collection of the most recently used filters.
DataControlBase.AddMRUFilter Adds the specified filter to the collection of the most recently used filters.
DataControlBase.RemoveMRUFilter Removes the specified filter from the collection of the most recently used filters.
DataControlBase.ClearMRUFilter Clears the collection of the most recently used filters.

Edit Filter

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


The Filter Panel does not display the Edit Filter button if the GridControl is bound to a virtual source.

API Description
DataViewBase.AllowFilterEditor Specifies whether to allow users to invoke the Filter Editor from the column header’s context menu and Filter Panel.
DataViewBase.ShowEditFilterButton Returns whether the Edit Filter button is displayed in the Filter Panel.
DataViewBase.ShowFilterEditor(ColumnBase) 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
DataViewCommandsBase.ClearFilter Clears the filter.

Master-Detail Filter Panel

If the GridControl displays detail views, the Filter Panel indents expressions so they visually correspond to individual detail views.

Legacy and New Filter Panels

To use the legacy Filter Panel: