Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by lkotha on Apr 04, 2008 12:34
open dhtmlx forum
How to exapnd the tree upto second level

I am populating tree with dynamic XML which is coming from server side. I am displaying tree to the user using DHTML dhtmlXTreeObject. Everything works fine. But when I display the tree it is just displaying the root node i.e., first level of the tree. My requirement is to expand the tree up to second level. How can I do this? Please help me.

Thanks in advance,
Lkotha
Answer posted by Support on Apr 07, 2008 05:18
You can issue opening command from XML or javascript

In javascript

    tree.loadXML(url,function(){
       tree.openItem(top_level_id);
    });

or , by XML

<tree>
    <item id='some' text=' top one' open='1' >
       ....
Answer posted by Lkotha on Apr 07, 2008 13:13
I did it on the XML. It worked.

Thanks