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

[Solved] Node select()

1 Answer 186 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 04 Feb 2008, 06:27 AM
I am using a radtreeview that is L.O.D. Using client side method select(), I select a node. It hightlights so I know it is working. What is doesn't do is follow through on the NavigateURL. Is this what you intended? If so how do I go about it?

Thankyou.

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 04 Feb 2008, 02:49 PM
Hi Josh,

Yes, this is the correct behavior. The select() method just selects the item as if you were using the keyboard.

If you want to select a node and then navigate to the NavigateUrl value of the node you can do something like this:

<script type="text/javascript"
function selectNode() 
    var tree = $find("<%= RadTreeView1.ClientID %>"); 
    var node = tree.get_nodes().getNode(0); 
    node.select(); 
    var url = node.get_navigateUrl(); 
    if (url.length > 0) 
      { 
          window.location = url; 
      } 
</script> 


I hope this helps.

All the best,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Josh
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or