This is a migrated thread and some comments may be shown as answers.

Tree Node Select

1 Answer 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Awais
Top achievements
Rank 1
Awais asked on 29 Apr 2009, 11:01 AM
Hi, 
    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

Awais

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 29 Apr 2009, 11:34 AM
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.

[javascript]
 
<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  
   }  
}  
</script> 

Thanks,
Princy.
Tags
TreeView
Asked by
Awais
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or