i wrote this code in order to expand node and all its parents node
function
PerformSearch()
{
var tree = $find("MenuTree");
var strToSearch = document.getElementById("txtSearchText").value;
var node = tree.findNodeByText(strToSearch);
var ParentNode=null;
if(node)
{
node.highlight();
node.scrollIntoView();
ParentNode = node.get_parent();
while (ParentNode != null)
{
ParentNode.expand();
ParentNode = node.get_parent();
}
}
}
but its run very slowely,
is there another way to perform this action that wont take so long?
p.s. the tree contains 800 nodes