Accessing TreeView Control properties on the client side

  • Thread starter Thread starter Soumitra Bajpai
  • Start date Start date
S

Soumitra Bajpai

Hi ,

I want to disable (AutoPostBack) for the tree . So on the
click event I am able to retrieve the index of the node
clicked on the client side .

I wish to retrieve the nodedata or another element that I
can selectively pass to the server ,which can identify the
node .

Thanks in Advance,

Soumitra
 
Hi Natty,

Thanks for the solution. I got that.

For everybody else

function myfunc()
{
var SelectedNode;
// This gives you the node that is clicked
SelectedNode=TreeView1.getTreeNode
(TreeView1.clickedNodeIndex);
// just checks and returns a property of the node
if (SelectedNode!=null)
{
alert(SelectedNode.getAttribute("text"));
}
}

Tie this in to the onclick event of the tree.

Hope this helps

Warm Regards,

Soumitra
 
Back
Top