ITableFilterItem.Conditions

Syntax

Conditions: ITableFilterConditions;

Description

The Conditions property returns the collection of filtering conditions.

Example

Executing the example requires a form with the Button1 button, the DataGrid component named DataGrid1 and the UiDataSource component that is a data source for DataGrid.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        filter: ITableFilter;
        filterItem: ITableFilterItem;
        cond1, cond2: ITableFilterCondition;
    Begin
        filter := DataGrid1.TableFilter;
        filterItem := filter.Item(0);
        cond1 := filterItem.Conditions.Add;
        cond1.Condition := FilterCondition.Less;
        cond1.Value := 6;
        cond1.Relation := FilterRelation.And_;
        cond2 := filterItem.Conditions.Add;
        cond2.Condition := FilterCondition.More;
        cond2.Value := 2;
        filterItem.State := FilterItemState.Condition;
    End Sub Button1OnClick;

On clicking the Button1 button the first column is filtered by the following conditions: less than 6 and greater that 2.

See also:

ITableFilterItem