IDimensionViewer.GetCheckedNodes

Syntax

GetCheckedNodes([WithIndeterminate: Boolean = False]): IDimSelection;

Parameters

WithIndeterminate. Optional parameter that determines whether the elements having a checkbox selection in intermediate state (CheckState=Indeterminate) are included in the collection. By default, the elements with an intermediate state of checkbox selection are not included in the collection.

Description

The GetCheckedNodes method returns the collection of the elements, for which the checkbox is selected.

Example

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.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CheckedElem: IDimSelection;
    i: Integer;
Begin
    CheckedElem := DimensionTree1.GetCheckedNodes(True);
    i := CheckedElem.SelectedCount;
End Sub Button1OnClick;

On clicking the button the collection of the DimensionTree1 component elements having a checkbox selected is obtained. The elements with an intermediate state of checkbox selection are also included in the collection. The "i" variable contains the number of elements in the obtained collection.

See also:

IDimensionViewer