Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by smitha on Jun 26, 2009 04:35
open dhtmlx forum
maintain the states of open nodes

I am doing a web application in which when we click on a node,a function is called to load a new page in the same window.In doing so,I want to keep the previous open state of nodes intact.how is it possible?
i tried doing
tree.selectItem(id);
tree.openItem(id);
tree.focusItem(id);
but this is not working.
What should i do?
Answer posted by Alex (support) on Jun 26, 2009 06:03

These methods should be called after tree is completely loaded:

tree.loadXML("tree.xml",doAfterLoading);

function doAfterLoading(){

  tree.selectItem(id); 
  tree.openItem(id); 
  tree.focusItem(id);

}