selectChild (key);
key. Key of the dictionary element whose children must be selected.
The selectChild method selects children of the dimension element with the specified key.
To execute the example, the HTML page must contain the DimTree component named dimTree, which has a defined source, namely, the dimension named dim (see. Example of Creating the DimTree Component). The dimension must include an element with the key YEARS:2002. Let us select all children of the specified element:
dimSrv.getAllElements(dim);
//all elements are loaded together with children
dim.setIsAllElsLoaded(true);
//mark children of the element with specified key
dim.selectChild("YEARS:2002");
//refresh the tree
dimTree.refreshAll();
After executing the example children of the node with the key YEARS:2002 become selected.
Use the DimSource.deSelectChild method to deselect selected children:
dim.deSelectChild("YEARS:2002");
dimTree.refreshAll();
See also: