SelectHierarchy: IDimHierarchyInstance;
The SelectHierarchy property determines and adds alternative hierarchy in dictionary selection.
To work in selection with selected elements included in the specified alternative hierarchy, use IDimSelection.LimitToHierarchy.
Executing the example requires that the repository have:
Forms containing components:
DimensionTree with the DimensionTree1 identifier.
UiDimension with the UiDimension1 identifier which is the data source for DimensionTree1.
Dictionary containing an alternative hierarchy. Dictionary is data source for UiDimension1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
dim: IDimInstance;
hier: IDimHierarchyInstance;
Begin
dim := UiDimension1.DimInstance;
hier := dim.Hierarchies.Item(0);
UiDimension1.Selection.SelectAll;
UiDimension1.Selection.LimitToHierarchy(hier);
UiDimension1.Selection.SelectHierarchy := hier;
End Sub Button1OnClick;
On clicking the button only the elements included in specified alternative hierarchy keep selected.
See also: