TcxGridFilterRow.Operators Property
Specifies the filter operator associated with a specified column within the filter row.
Declaration
property Operators[Index: Integer]: TcxFilterOperatorKind read; write;
Property Value
Type |
---|
TcxFilterOperatorKind |
Remarks
The column is identified by its Index property value, which is passed as the Index parameter.
In the filter row, any column can be associated only with one filter operator. Providing a filter operand via a column’s filter row cell creates a filter condition based on this operand and the associated operator and applies it to the column values. If the currently applied filter criteria contain two or more filter conditions for a column, only the first of them is associated with this column and assigned to the Operators property. In addition, applying filter criteria by the filter row replaces these conditions with the associated condition.
The filter operators stored by the Operators property are in effect only if the View’s FilterRow.OperatorCustomization property is set to True. In this instance, each filter row cell displays a button that indicates the associated operator. Otherwise, the operator for any column whose filter operand is not specified reverts to the foEqual operator and the Operators property value is ignored.
The following code example shows how to associate the > filter operator (‘GREATER THAN’) with the TableViewOrderID column and create a ‘> 10’ (‘GREATER THAN 10’) filter condition based on it.
<TableView>.FilterRow.OperatorCustomization := True;
<TableView>.ViewData.FilterRow.Operators[TableViewOrderID.Index] := foGreater;
<TableView>.ViewData.FilterRow.Values[TableViewOrderID.Index] := 10;
Alternatively, you can use the column’s Options.FilterRowOperator property. Refer to its description for a code example that produces the same result.