With filter dropdowns, you can filter records by the values of grid
items. To invoke a filter dropdown list for a grid item, click its
filter dropdown button.
The (All) and (Custom…) items are always added to the list.
Selecting the (All) item removes all the filter conditions set for the
current column. The (Custom…) item invokes the Custom Filter or
Filter Builder dialog window which allow you to visually construct
the filter criteria for the given column or current view, respectively.
When a user selects a value from the list (any item other than (All),
(Custom…), (Blanks) or (NonBlanks)), a new filter condition is created
and applied to the data in the current view. This new condition is of
the type:
= ,
where stands for the current column for which the filter list was
activated and defines the selected value. For instance, when selecting
the 'Mercedes-Benz' item, the "Trademark = Mercedes-Benz" filter
condition is created and applied:
When filtering is applied, the filter panel appears with a description
of the filter criteria. You can temporarily deactivate and then activate
filtering by clicking the checkbox on this panel. The X button
clears all the filter criteria applied.
Selecting the (Custom) item from the filter dropdown activates the
Custom Filter dialog window.
This dialog allows you to specify the filter criteria for a single
column consisting of one or two filter conditions combined by the AND or
OR logical operator.
The following image shows all the possible operators:
Operator | Text representation |
= | equals |
<> | does not equal |
< | is less than |
is less than or equal to | |
> | is greater than |
>= | is greater than or equal to |
LIKE | like |
NOT LIKE | not like |
= NULL | is blank |
<> NULL | is not blank |
In addition to the operator, values must be specified via the value box.
This uses the same editor type as the column (stand-alone and in-place
use the same editor classes).
When using the LIKE or NOT LIKE operator, you can substitute one or more
symbols in a string value with specific characters (by default, the
'underscore' (_) and 'percent' (%).
In some cases, filter conditions cannot be displayed with the help of
the Custom Filter dialog. Thus, if the filter criteria contain more than
two conditions bound to a single column or if non-supportable operators
are used, the Filter Builder dialog window is activated instead when
selecting the (Custom...) option from the filter dropdown list.
The Filter Builder dialog extends the functionality of the Custom Filter
dialog window. Unlike the Custom Filter dialog, the Filter Builder
dialog allows you to specify the filter criteria for any columns in the
view. The Filter Builder dialog supports all possible operators. In
addition to those described in the above table, you can create filter
conditions using the BETWEEN, membership test operators and date/time
related operators.
Operator | Description |
BETWEEN |
The operator allows you to select records whose column values are included between two operands. To specify the range, use the editors which appear when clicking the operand boxes. The operator displayed in the picture above is equivalent to the following statement: ID>=1 AND ID |
NOT BETWEEN |
The NOT BETWEEN operator selects records whose column values are not included in the required range. Operands are specified in the same manner as for the BETWEEN operator. The equivalent of the operator displayed in the image is: ID<1 and id>100 |
IN |
Implements a membership test operator. The IN operator selects records with column values equal to operands from the specified set. To add an operand to the set, click the '+' button. The equivalent to the IN operator shown in the image above is: ID=1 OR ID=4 OR ID=7 |
NOT IN |
The negation of the IN operator. It selects a record if its column value is not a member of a specified set. The equivalent to the IN operator shown in the image above is: ID<>1 AND ID<>4 AND ID<>7 |
Date/time operators: is yesterday is today is tomorrow is last 7 days is last week is last 14 days is last two weeks is last 30 days is last month is last year is past is this week is this month is this year is next 7 days is next week is next 14 days is next two weeks is next 30 days is next month is next year is future |
This group of operators is available only for date/time fields. They do not require any operands. For instance, the is today operator selects records with column values equal to the current day. The is this year operator selects records equal to the current year, etc. |
The Filter Builder dialog also supports two more Boolean operators to
combine conditions in the list: NOT AND and NOT OR. NOT AND combines
conditions by the AND operator and then negates the result:
These criteria select all records except those with the Car column value
set to 'BMW 530i' and PaymentType set to Cash. The equivalent text
representation is: NOT (Car='BMW 530i' AND PaymentType=Cash)
NOT OR combines conditions by the OR operator and then negates the
result:
With these criteria, the grid selects records, which don't have their
PaymentType set to Master or Visa. The text representation is: NOT
(PaymentType=Master OR PaymentType=Visa)