function ExpandAll() { var treeviewCell = document.getElementById('cell_treeview'); var treeview = treeviewCell.childNodes[0]; if (treeview != null) { for (var r = 0; r < treeview.rows.length; r++) { var nodeID = treeview.rows[r].id.split('_')[1]; ExpandBranch(nodeID); } } }
function ExpandBranch(nodeID) { var data = "<Node Action=\"GetBranch\" ID=\"" + nodeID + "\" />"; //send xmlhttprequest for getting branch var xmlDoc = ReadData(SendData(data)); //read the response as xml document var nodes = xmlDoc.getElementsByTagName("Node[@HasChilds=\"True\"]"); for (var n = 0; n < nodes.length; n++) { var nodeID = nodes[n].getAttribute("ID"); if (ShouldBeExpanded(nodeID)) { CollapseExpand(nodeID); //again send xmlhttprequest for getting childs } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)