LevelAttribute(Level: IDimLevel): IDimAttribute;
Level. Dimension level, which attributes must be obtained.
The LevelAttribute property determines, which dictionary attribute values are displayed for the elements of this column on the specified level.
By default, the values of the attribute set in the IDimensionViewerColumn.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 that is a data source for DimensionTree1. The dictionary that is linked to the 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 the first column of the DimensionCombo1 component displays values of the Name attribute for the first level elements, and displays values of the Identifier attribute for the second level elements.
See also: