Tree Node Select

2 posts, 1 answers
  1. Awais
    Awais avatar
    5 posts
    Member since:
    Mar 2009

    Posted 29 Apr 2009 Link to this post

        I am facing a problem , that i want to select the Node on ClientSide... on the Same way i dont need to fire the NodeClick event, when i select that node from ClientSide... Means the Node Click event should only be Fired when i manually click the Node... How can i Stop this.. Beacuse its creating Problem for me , as i am using Ajax in my Application...

    Thanks and Best Raegards

  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 29 Apr 2009 Link to this post

    Hi Awais,

    You can use the set_selected() method for selecting or unselecting a Node based on the boolean parameter. Calling the set_selected(true) function will select the Node but will NOT do postback.

    <script type="text/javascript">  
    function selectNode()  
       var tree= $find("<%= RadTreeView1.ClientID %>");  
       var node = tree.findNodeByText("Root RadTreeNode1");  
       if (node)  
           node.set_selected(true);  // No PostBack occurs  

Back to Top