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

alternative to DataNavigateUrlField

1 Answer 57 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Magnus Modig
Top achievements
Rank 1
Magnus Modig asked on 20 Oct 2013, 11:14 AM

Hi


I use the DataNavigateUrlField property to transfer users to Another page when they click a node in the tree, is there Another way to do that using JavaScript instead, for example I use this exsisting JavaScript..



<script type="text/javascript">
 
 
    function onNodeClicked(sender, args) {
        var node = args.get_node();
        node.set_expanded(!node.get_expanded());
    }
 
    function nodeClicking(sender, args) {
 
        var nodeAtt = args.get_node().get_attributes().getAttribute("toClick");
        if (nodeAtt == "NotClickable") {
            args.set_cancel(true);
            var node = args.get_node();
            node.set_expanded(!node.get_expanded());
        }
    }
</script>




Can this be modified to transfer the user to the page that is defined using the DataNavigateUrlField property?









1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 23 Oct 2013, 10:06 AM
Hi Magnus,

Did you try using the get_navigateUrl()/set_navigateUrl() property of the node as described at the end of this help article? Is this useful in your scenario or I am missing something?

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeView
Asked by
Magnus Modig
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or