LevelAttribute(Level: IDimLevel): IDimAttribute;
Level — the dimension level, which attributes need to be retrieved.
The LevelAttribute property determines the dictionary attribute value, that is to be displayed for the elements of this column at a specified level. By default the values of the attribute set in the Attribute property are displayed at all levels.
Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1 and the UiDimension component, which is a data source for the DimensionTree1. The dictionary, that is linked to UiDimension component, has at least two levels in its structure.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Col: IDimensionViewerColumn;
Attrs: IDimAttributes;
Lvls: IDimLevels;
Begin
Col := DimensionTree1.Columns.Item(0);
Attrs := UiDimension1.Dimension.Attributes;
Lvls := UiDimension1.Dimension.Levels;
Col.LevelAttribute(Lvls.Item(0)) := Attrs.Name;
Col.LevelAttribute(Lvls.Item(1)) := Attrs.Id;
End Sub Button1OnClick;
After executing the example in the first column of the DimensionCombo1 component the values of the Name attribute are displayed for the first level elements, and for the second level elements - the Identifier attribute values are displayed.
See also: