DimGroup: IDimElementGroup;
The DimGroup property determines the dictionary elements group, on which basis an element tree in the component should be built.
Executing the example requires a form with the Button1 button, the DimensionTree, DimensionCombo components and UiDimension, that is a data source for DimensionTree and DimensionCombo. The dictionary loaded into UiDimension must have two element groups.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Groups: IMetabaseObjectDescriptors;
ElemGroup: IDimElementGroup;
Begin
MB := MetabaseClass.Active;
Groups := (UiDimension1.Dimension As IMetabaseObject).Children;
ElemGroup := Groups.Item(0).Bind As IDimElementGroup;
DimensionTree1.DimGroup := ElemGroup;
ElemGroup := Groups.Item(1).Bind As IDimElementGroup;
DimensionCombo1.DimGroup := ElemGroup;
End Sub Button1OnClick;
After executing the example, on clicking the button in the DimensionTree1 component the element tree based on the dictionary first element group is displayed, and in the DimensionCombo1 component - the element tree based on the dictionary second element group.
See also: