deselectEl(key: String, doCheck: Boolean);
key. Key of the element, from which selection is cleared
doCheck. Indicates if element selection state is checked. If the value is True, element selection state is checked, otherwise it is not.
The deselectEl method clears element selection.
To execute the example, the HTML page must contain the DimTree component named dimTree (see. Example of Creating the DimTree Component). Check if dictionary elements can be selected:
// Check if dictionary elements can be selected console.log((dim.getAllowSelection() ? "Elements can be selected" : "Elements cannot be selected"));
As a result the console displays check result:
Elements can be selected
Select the element with the YEARS:2002 key:
// Select the element dim.selectEl("YEARS:2002"); // Refresh the tree dimTree.refreshAll();
As a result the 2002 element is selected in the tree:
Deselect the element with the YEARS:2002 key:
// Deselect the element dim.deselectEl("YEARS:2002"); // Refresh the tree dimTree.refreshAll();
As a result the 2002 element is deselected.
See also: