IsLeafLoaded(Element: Integer): Boolean;
Element. Index of dictionary element.
The IsLeafLoaded method returns attribute that dictionary element is loaded.
The method returns True, if element is loaded and False, if otherwise.
Executing the example requires a form containing the DimensionTree component with the DimensionTree1 identifier, the UiDimension component with the UiDimension1 identifier and the Button component with the Button1 identifier. Determine the UiDimension1 component as data source for the DimensionTree1 component. Data source for the UiDimension1 component must be MDM table dictionary with set dynamic loading of elements.
The example is a handler of the OnClick event for the Button1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Dim: IDynamicInstance;
LastItemIndex: Integer;
Begin
Dim := UiDimension1.DimInstance As IDynamicInstance;
// Get index of the last dictionary element
LastItemIndex := Dim.CreateDimElementArray.Count - 1;
If Dim.IsLeafLoaded(LastItemIndex) Then
Debug.WriteLine("Last element is loaded");
Else
Debug.WriteLine("Last element is not loaded");
End If;
End Sub Button1OnClick;
On clicking the Button1 button the console displays the message indicating whether the last dictionary element is loaded.
See also: