[Script]
// TreeView control object creation
var treeViewObj = $("#treeView").ejTreeView("instance");
// To get both checked and Indeterminate node
var nodes = treeViewObj._liList.find('> div > .e-chkbox-wrap[aria-checked="mixed"],> div > .e-chkbox-wrap[aria-checked="true"]').closest('.e-item'); |
btnClick() {
let allNode = document.querySelectorAll(".e-control.e-treeview .e-checkbox-wrapper[aria-checked='mixed'], .e-checkbox-wrapper[aria-checked='true']");
let checked = [];
for (let i=0;i<allNode.length; i++){
// get element
let node = allNode[i].closest(".e-list-item");
// get node data
let nodeId = this.tree.getNode(node).id;
checked.push(nodeId);
}
console.log(checked);
}
|
Description |
Link |
Getting started |
|
Tree node operation |
|
API documentation |