Filter Panel
- 2 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 or clear the filter.
Filter Panel Elements
Filter Expression
Column filters are combined by the
AND
operator into a single filter expression applied to the GridControl. To obtain the filter string, use the DataControlBase.FilterString property.Enable/Disable Filter
Use this check box to enable/disable the current filter at runtime.
To do the same in code, use the DataControlBase.IsFilterEnabled property.
Most Recently Used Filters
Invokes a drop-down list that displays the most recently used filters in the GridControl.
Edit Filter
Invokes the Filter Editor.
The Filter Panel does not display the Edit Filter button if the GridControl is bound to a virtual source. Set the DataViewBase.AllowFilterEditor property to true to show this button.
Clear Filter
Clears the current filter.
API
API | Description |
---|---|
DataViewBase.ShowFilterPanelMode | Specifies whether to display the filter panel within a View. |
DataViewBase.ShowEditFilterButton | Specifies whether to display the Edit Filter button within the filter panel. |
DataViewBase.FilterPanelText | Specifies the text displayed within the filter panel. |
DataViewBase.CustomFilterDisplayText | This event allows you to display custom text within the filter panel. |
Previous and New Filter Panels
The GridControl v20.1 and later supports the new filter panel:
The previous filter panel displays a filter string.
The new filter panel displays a filter expression as a set of blocks with different colors for each block type (column name, field value, date-time function).
To use the new filter panel:
- For a specific GridControl, set the DataViewBase.UseLegacyFilterPanel property to false.
- For all GridControls, set the CompatibilitySettings.UseLegacyFilterPanel property to false.