IDimSelection.Group

Syntax

Group: IDimElementGroup;

Description

The Group property determines a group of dictionary elements set in the selection.

Example

Executing the example requires a form, a button on the form and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The MetaAttributesBreadcrumb component is connected to the time series database of factors.

The first element of the MetaAttributesBreadcrumb component is the element referring to the dictionary, that contains the group of elements with the GROUP_TEST identifier.

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

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

Var

MetaItems: IBreadcrumbItems;

Item: IMetaAttributeBreadcrumbItem;

Group: IDimElementGroup;

mb: IMetabase;

Selection: IDimSelection;

DictDescr: IMetabaseObjectDescriptor;

Begin

MetaItems := MetaAttributesBreadcrumb1.Items;

Item := MetaItems.Item(0) As IMetaAttributeBreadcrumbItem;

Group := Item.GetDimGroup;

If Group = Null Then

Selection := Item.GetSelection;

Selection.DeselectAll;

DictDescr := Item.MetaAttribute.ValuesObject;

mb := MetabaseClass.Active;

Group := mb.ItemByIdNamespace("GROUP_TEST", DictDescr.Key).Bind As IDimElementGroup;

Selection.Group := Group;

Item.SetSelection(Selection);

End If;

End Sub Button1OnClick;

After executing the example the first element of the MetaAttributesBreadcrumb component contains selection that includes all the elements from the indicated group.

See also:

IDimSelection