Filtering Overview
- 2 minutes to read
#Overview
Filtering allows you to display a subset of records in a data source that meet the desired criteria. When filtering is applied, only data rows that meet specified criteria are displayed. Data can be filtered against a single column or multiple columns. End-users can build simple filter criteria and apply them, using the Automatic Filter Row or a column's filter dropdown. Complex filter expressions can be created and applied via the Filter Editor.
Applying filtering to a column does not affect the filter settings of any other column. Column filters are combined by the AND operator into a single filter expression that is applied to the grid. The filter string can be considered to be the WHERE clause of an SQL SELECT statement.
By default, the Filter Panel is automatically shown at the bottom of the View, after a filter has been applied. Removing the filter hides this panel. The filter panel displays a string that represents current filter criteria, and contains buttons to disable/enable and clear the filter. To make this panel always visible or always hidden, use the DataViewBase.ShowFilterPanelMode property.
The text displayed within the Filter Panel, is returned by the DataViewBase.FilterPanelText property. To provide your own text that describes the grid's filter, handle the DataViewBase.CustomFilterDisplayText event.
#Availability
Automatic Filter Row
By default, the Automatic Filter Row is hidden. To show it, set the TableView.ShowAutoFilterRow property to true.
Column Filter Dropdowns
The availability of the filter dropdowns is controlled by a view's DataViewBase.AllowColumnFiltering option. Individual columns provide the ColumnBase.AllowColumnFiltering property that allows the default behavior, specified by a View to be overridden. For instance, you can prevent end-users from invoking the filter dropdowns of individual columns. When filtering by a column is disabled, its filter button is not displayed.
Filter Editor
The Filter Editor is invoked via a column's context menu. To prevent an end-user from using the Filter Editor, disable the DataViewBase.AllowFilterEditor option.
Note that these settings do not affect filtering in code.
#Concepts
- Automatic Filter Row
- Filter Dropdown
- Filter Editor
- Filter Modes and Custom Filtering
- Filtering in Code
- Filter Expressions
- End-User Capabilities - Filtering