BeforeRequestSelection: function (sender, args);
sender. Event source.
args. Event information.
The BeforeRequestSelection event occurs before changing tree elements selection.
After the elements selection is changed, the DimTreeView.RequestSelection event occurs.
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: