IDimensionViewerColumn.LevelAttribute

Syntax

LevelAttribute(Level: IDimLevel): IDimAttribute;

Parameters

Level — dimension level, which attributes must be obtained.

Description

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 Attribute property are displayed at all levels.

Example

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:

IDimensionViewerColumn