TreeList.getAllCollapsedKeys

Syntax

getAllCollapsedKeys();

Description

The getAllCollapsedKeys method returns the array of keys that belong to all collapsed tree nodes and nodes without children.

Example

To execute the example, the page must contain the TreeList component named treeListSett (seebsp;. Example of Creating the TreeList Component). Obtain contents of all collapsed nodes and nodes without children:

// Expand all nodes
treeListSett.colapseAll();
console.log("Contents of collapsed nodes and nodes witout children:");
var collapsedKeys = treeListSett.getAllCollapsedKeys()
for (var i = 0; i < collapsedKeys.length; i++) {
    console.log(treeListSett.getNodeByKey(collapsedKeys[i]).getText());
}

As a result the console displays the contents of collapsed nodes and nodes without children:

Contents of collapsed nodes and nodes without children:

South Africa

Egypt

See also:

TreeList