IDimSelection.LimitToGroup

Syntax

LimitToGroup(Group: IDimElementGroup);

Parameters

Group - group of dictionary elements, that is to be left in the selection.

Description

The LimitToGroup method changes elements selection and leaves only the elements that are included to the Group group.

Example

Executing the example requires a form with the Button1 button, the DimensionTree components and the UiDimension component named UiDimension1, that is a data source for DimensionTree. Dictionary downloaded in UiDimension1 has a group of elements.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Sel: IDimSelection;

MObj: IMetabaseObject;

Group: IDimElementGroup;

Begin

Sel := UiDimension1.Selection;

MObj := (UiDimension1.Dimension As IMetabaseobject);

Group := MObj.Children.Item(0).Bind As IDimElementGroup;

Sel.LimitToGroup(Group);

//Selection update in DimensionTree

DimensionTree1.Selection.Parse(Sel.ToVariant);

End Sub Button1OnClick;

After executing the example when the button in the list of selected elements of the DimensionTree1 component is pressed, only elements included into the group of dictionary elements are left.

See also:

IDimSelection