Skip to main content

TcxFilterCriteria Class

The base class for grid filtering facilities.

Declaration

TcxFilterCriteria = class(
    TPersistent
)

Remarks

This class is an abstract class which provides the base filtering facilities for a grid control. Filter criteria for a grid control can consist of several filter conditions combined by logical operators (AND / OR). In turn, a filter condition can represent either a simple comparison operation or an aggregate condition consisting of other simple (or aggregate) conditions combined by logical operators. Thus, you can build complex filter criteria to filter data. The following condition illustrates a complex filter:

(CustNo > 12) AND (LastOrder = ‘12/31/2000’ OR LastOrder = ‘12/31/2001’)

There are three filter items:

  1. CustNo > 12

  2. LastOrder = ‘12/31/2000’

  3. LastOrder = ‘12/31/2001’

To represent such a condition, two lists are used. The first list stores simple conditions 2 and 3. These conditions are combined by the OR operator. The second list is the root one. It points to the simple condition 1 and the condition defined by the first list. Conditions in the second list are combined by the AND operator.

Use the Root property to access the root list of filter conditions for the TcxFilterCriteria object. A list of filter conditions is represented by the TcxFilterCriteriaItemList class. A simple condition (filter item) is implemented by the TcxFilterCriteriaItem object.

The TcxDataFilterCriteria class is an immediate descendant of the TcxFilterCriteria class. It introduces properties, methods, and events that extend the filtering capabilities.

Inheritance

TObject
TPersistent
TcxFilterCriteria
See Also