DimTreeView.selectByAttrs

Syntax

selectByAttrs(value: Boolean, attrIds: String || Array, text: String || PP.Mb.DimFilter, callback: Function);

Parameters

value. Determines the type of element selection command. If the parameter is set to True, the selection is set for the selected elements, otherwise, elements are deselected.

attrIds. Array of attributes.

text. Substring, by which elements are filtered.

callback. Callback function.

Description

The selectByAttrs method selects tree items that match value of the specified attribute.

Example

To execute the example, the HTML page must contain the DimTree component named dimTree (see Example of Creating the DimTree Component). Select the elements, which names contain the 2 character:

// Get name attribute
var attr = dim.getAttribute("NAME");
// Set selection for tree elements
dimTree.selectByAttrs(True, [ attr ], "2");

As a result the tree elements, which names contain the 2 character, are selected:

See also:

DimTreeView