IEaxGrid.KeepOnlyElements

Syntax

KeepOnlyElements(Range: ITabRange; [SlotIndex: Integer = -1]);

Parameters

Range. Table cells range

SlotIndex. Slot index in the header.

NOTE. The SlotIndex parameters determines in which dimension entering in the header, selection must be changed. If SlotIndex = -1, selection will be changed in the first dimension.

Description

The KeepOnlyElements method changes selection in such a way that only the specified cell range is available in the table.

Comments

As a value of the Range parameter, the range of headers cells, located in the rows or columns, is required to be determined.

The method leaves available elements of the dimension, the index of which is passed to SlotIndex.

Example

Executing the example requires a form containing the Button component named Button1, the TabSheetBox component named TabSheetBox1 and the UiErAnalyzer component named UiErAnalyzer1. Set UiErAnalyzer1 as a data source for the TabSheetBox1 component.

Set express report as a data source for the UiErAnalyzer1 component. Set the Active property to True for the UiErAnalyzer1 component.

The procedure is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Eax: IEaxAnalyzer;
    Grid: IEaxGrid;
    TR: ITabRange;
Begin
    Eax := UiErAnalyzer1.ErAnalyzer;
    Grid := Eax.Grid;
    TR := Grid.TabSheet.ParseRange("C1:D2");
    Grid.KeepOnlyElements(TR);
End Sub Button1OnClick;

After executing the example only the cells of the specified range are in the table.

See also:

IEaxAnalyzer