DimTreeView.BeforeRequestSelection

Syntax

BeforeRequestSelection: function (sender, args);

Parameters

sender. Event source.

args. Event information.

Description

The BeforeRequestSelection event occurs before changing tree elements selection.

Comments

After the elements selection is changed, the DimTreeView.RequestSelection event occurs.

Example

To execute the example, the HTML page must contain the DimTree component named dimTree (see Example of Creating the DimTree Component). Add a handler for the BeforeRequestSelection event:

dimTree.BeforeRequestSelection.add(function (sender, args) {
   console.log("First selected element: " + dimTree.getSelectedNodes() + "; number of selected elements: " + dimTree.getSelectedCount())
});

After executing the example before changing elements selection the browser console shows name of the first element selected in the tree before selection starts changing and the number of elements selected in the tree before selection starts changing.

See also:

DimTreeView