Skip to main content

Filter Builder

  • 3 minutes to read

The filter builder allows end-users to build complex filter criteria with an unlimited number of filter conditions, combined by logical operators.

This topic contains the following sections:

ASPxGridView_FilterControl

How to Invoke the Filter Builder

Click the filter image or filter expression in the filter bar to invoke the filter builder. Set the ASPxGridSettings.ShowFilterBar property to one of the following values to show the filter bar.

  • Hidden - The filter bar is always hidden.
  • Visible - The filter bar is always visible.
  • Auto - The filter bar is shown when a user filters grid data.

FilterControlShow1

You can control the filter builder’s visibility programmatically using the following methods:

Action Client-side methods Server-side methods
Show ASPxClientGridView.ShowFilterControl ASPxGridBase.ShowFilterControl
Hide ASPxClientGridView.CloseFilterControl ASPxGridBase.HideFilterControl

How to Specify the Filter Builder Elements Visibility

Tab Visibility

End-users can create filter criteria using the Visual tab or by typing the criteria as text (Text tab). Set the ASPxGridFilterControlSettings.ViewMode property to VisualAndText to enable both the Text and Visual tabs. This synchronizes a tab’s content automatically.

FilterControl_Tabs

Group Operator Visibility

Use ASPxGridFilterControlSettings.GroupOperationsVisibility property to specify the group operators’ visibility in the drop-down menu.

FilterControl_GroupOperators

Operand Type Button Visibility

The operand type button allows end-users to switch a filter condition between two modes: comparing a field’s value to a value; or comparing a field’s value to another field’s value. Use the ASPxGridFilterControlSettings.ShowOperandTypeButton property to show this button visible.

FilterControl_OperandTypeButton

Visibility of Filter Operators

The filter control drop-down window displays different comparison operators based on the column data type. The table below lists comparison operator’s visibility for different column types.

Filter Comparison Operator String Column[1] ComboBox Column Binary Image Column Date Column Other Type Column (Numbers, etc.)
Equals yes yes (default value) no yes (default value) yes
Does not equal yes yes no yes yes
Is greater than yes no no yes yes (default value)
Is greater than or equal to yes no no yes yes
Is less than yes no no yes yes
Is less than or equal to yes no no yes yes
Is between yes no no yes yes
Is not between yes no no yes yes
Contains yes no no no no
Does not contain yes no no no no
Begins with yes (default value) no no no no
Ends with yes no no no no
Is like yes no no no no
Is not like yes no no no no
Is blank yes yes no yes yes
Is not blank yes yes yes (default value) yes yes
Is any of yes yes yes yes yes
Is none of yes yes no yes yes
Date operators[2] no no no yes no

FilterControl_DateConditions

Online Demo

GridView - Filter Builder

Footnotes
  1. A string column is a column containing string values or a column whose GridDataColumnSettings.FilterMode property is set to DisplayText.

  2. For date columns, the filter control displays an additional list of date operators.