ITableFilterConditions.Add

Syntax

Add: ITableFilterCondition;

Description

The Add method adds a filtering condition to the collection.

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: ITableFilterCondition;
                
    Begin
        filter := DataGrid1.TableFilter;
        filterItem := filter.Item(0);
        cond1 := filterItem.Conditions.Add;
        cond1.Condition := FilterCondition.Less;
        cond1.Value := 6;
        filterItem.State := FilterItemState.Condition;
    End Sub Button1OnClick;

On clicking the Button1 button the first column is filtered by the condition, that is, less than 6.

See also:

ITableFilterConditions