IDimSelectionSchema.Process

Syntax

Process(

Selection: IDimSelection;

[Group: IDimElementGroup = Null]): IDimSelection;

Parameters

Selection - dictionary elements selection, for copies of which the selection schema is to be used.

Group - optional parameter that determines group of elements from Selection, within which selection schema is used. By default selection schema is used for all the elements within Selection.

Description

The Process method uses selection schema for the selection elements passed in the Selection parameter and returns selection copy with selected elements.

Example

Executing the example requires a form with a button named Button1 on it, the DimensionTree component named DimensionTree1 and the UiDimension component named UiDimension1, used as data source for DimensionTree1. The dictionary loaded to UiDimension1 contains one selection schema and one element group.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

DimSS: IDimSelection;

MDesc: IMetabaseObject;

Child: IMetabaseObjectDescriptors;

SelectionSchema: IDimSelectionSchema;

ElemGroup: IDimElementGroup;

Begin

MDesc := (UiDimension1.Dimension As IMetabaseObject);

Child := MDesc.Children;

If Child.Count <> 0 Then

SelectionSchema := Child.Item(0).Bind As IDimSelectionSchema;

ElemGroup := Child.Item(1).Bind As IDimElementGroup;

DimSS := SelectionSchema.Process(DimensionTree1.Selection, ElemGroup);

DimSS.SelectElement(10, False);

DimSS.SelectElement(20, False);

DimSS.SelectElement(30, False);

DimensionTree1.Selection := DimSS;

End If;

End Sub Button1OnClick;

After executing the example on clicking the button, the selection of elements of the dictionary from the DimensionTree1 component is obtained. For the first group of dictionary elements the selection correspond to the first schema of dictionary selection is specified. Three more elements are selected in the obtained selection, after that this selection is used for the DimensionTree1 component.

See also:

IDimSelectionSchema