SelectHierarchy: IDimHierarchyInstance;
SelectHierarchy: Prognoz.Platform.Interop.Dimensions.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.
The requirements and result of the Fore.NET example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Dimensions;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
dim: IDimInstance;
hier: IDimHierarchyInstance;
Begin
dim := UiDimensionNet1.DimInstance;
hier := dim.Hierarchies.Item[0];
UiDimensionNet1.Selection.SelectAll();
UiDimensionNet1.Selection.LimitToHierarchy(hier);
UiDimensionNet1.Selection.SelectHierarchy := hier;
End Sub;
See also: