ITableFilterItem.LimitCondition

Syntax

LimitCondition: ITableFilterLimitCondition;

Description

The LimitCondition property determines filtering conditions for the Top N filtering type.

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;
        limit: ITableFilterLimitCondition;
    Begin
        filter := DataGrid1.TableFilter;
        filterItem := filter.Item(1);
        limit := filterItem.LimitCondition;
        limit.Count := 2;
        limit.HighestValues := True;
        limit.Percentage := False;
        filterItem.State := FilterItemState.Limit;
    End Sub Button1OnClick;

On clicking the Button1 button the "2 greatest elements of the list" filter is applied for the second column.

See also:

ITableFilterItem