Expand treeView web control using client script

D

Dgorf

Hey,
I had some problems when tring 2 expand a treeViwe's node from
javascript.
B4 i change the selectedNodeIndex
document.all("TreeView1").selectedNodeIndex = ar.getNodeIndex();
I want 2 expand the current node (if the nodde is not expanded ,
selectedNodeIndex will become "0"),
but it seems that my code is not working (I'm calling
expandCurrentLevel b4 changing selectedNodeIndex )

function expandCurrentLevel()
{

var myNode = TreeView1.getTreeNode(TreeView1.selectedNodeIndex);

myNode.Expanded = true;
TreeView1.ExpandLevel+=1;

}

10x in advane

Dgorf,
..Net programmer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top