var treeviewObj = $("#treeInstalaciones").data("ejTreeView"); treeviewObj.collapseAll(); |
var treeviewObj = $("#treeInstalaciones").data("ejTreeView"); treeviewObj.collapseNode(treeviewObj.getSelectedNode()[0]); |
function collapseNodeAndChild(itemNode) { debugger; var treeviewObj = $("#treeInstalaciones").data("ejTreeView"); var nodesToCollapse = []; nodesToCollapse.push(itemNode); while (nodesToCollapse.length > 0) { var child = nodesToCollapse[0]; nodesToCollapse.pop(child); treeviewObj.collapseNode(child); //When this instrucction its executed, it exit the function, and the next code its not executed. for (i = 0; i < child.childNodes.length; i++) { var childInner = child.childNodes[i]; if (childInner.innerHTML.startsWith("<ul ")) { for (j = 0; j < childInner.childNodes.length; j++) { if (childInner.innerHTML.startsWith("<li ")) nodesToCollapse.push(childInner[j]); } } } } } |
function collapseNodeAndChild(itemNode) { debugger; var treeviewObj = $("#treeInstalaciones").data("ejTreeView"); var nodesToCollapse = []; nodesToCollapse.push(itemNode); for (i = 0; i < nodesToCollapse.length; i++) { var child = nodesToCollapse[i]; for (j = 0; j < child.childNodes.length; j++) { var childInner = child.childNodes[j]; if (childInner.innerHTML.indexOf("<ul ") >= 0) { for (k = 0; k < childInner.childNodes.length; k++) { var childLI = childInner.childNodes[k]; nodesToCollapse.push(childLI); } } } } var nodesReverse = nodesToCollapse.reverse(); while (nodesReverse.length > 0) { var child = nodesReverse[0]; nodesReverse.splice(0, 1); treeviewObj.collapseNode(child); } } |
Hi Jaime,
We have checked with your query and created a new incident under your account to track the status of the issue reported in this forum. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Regards,
Piramanayagam R