property G2antt.FilterCriteria as String
Retrieves or sets the filter criteria.

TypeDescription
String A string expression that indicates the filter criteria.
The FilterCriteria property specifies the logical expression used when evaluating filters across multiple columns. By default, the property is empty, so the filtering engine uses the logical and operator between columns. This means that when multiple columns are filtered, the result must satisfy the condition in the first column and the condition in the second column and so on for every other filtered column. An item is included only if it meets the filter in all filtered columns at the same time. Assigning a valid expression to FilterCriteria allows you to explicitly define the evaluation logic.

The FilterCriteria property supports the following operators (keywords are case-sensitive and must be written in lowercase):

Use parentheses ( ) to control the order of evaluation within an expression. Operators are guaranteed to be applied in the following precedence order:

  1. not
  2. and
  3. or

Columns are referenced in the expression using the % character followed by their zero-based index. The expression can combine % column identifiers (e.g., %0, %1) with the case-sensitive not, and, or keywords, using parentheses ( ) to define complex logical conditions and explicitly control the evaluation order between columns. For example, %0 refers to the first column, %1 to the second column, and so on. This allows you to build expressions that combine multiple column filters. For instance, the expression "%0 or %1" means that a match in either the first or the second column is sufficient. If a column is not explicitly included in the FilterCriteria property, but the user applies a filter on that column, the filtering engine automatically combines it with the existing expression using the and operator. For example, if you have three columns and the FilterCriteria is defined as "%0 or %1", and the user also filters on the third column, the effective expression becomes "(%0 or %1) an %2". In this case, items must match the filter on the third column and match either the first or the second column. 

Important Notes:

For instance, into a 4-column control:

Use the Filter and FilterType properties to define a filter for a column. The ApplyFilter method should be called to update the control's content after changing the Filter or FilterType property, in code! Use the DisplayFilterButton property to display a drop down button to filter by a column.