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

Is there a way to set target?

5 Answers 39 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 04 Sep 2015, 02:01 PM

On the menu control you can ".Target" on a RadMenuItem.

 

How do I do that for a navigation control?

I have a few items that I want to open into a new tab rather than redirecting.

 

Thanks

5 Answers, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 04 Sep 2015, 02:04 PM

Also is there a way to just bind a target property to the object that im binding it to like we do for DataTextField and DataNavigateUrlField?

0
Ivan Danchev
Telerik team
answered on 08 Sep 2015, 02:39 PM
Hello,

The RadNavigation does not have a DataTargetField property. Setting the Node's target can be done on the client, for example in the OnClientNodeClicking handler. To do so you can subscribe to the event and call the node's set_target() method in event's handler as shown below:
function OnClientNodeClicking(sender, eventArgs) {
    var node = eventArgs.get_node();
    node.set_target("_blank");
}

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Phil
Top achievements
Rank 1
answered on 08 Sep 2015, 02:44 PM

Is there a way to do this server site?

 

 

0
Phil
Top achievements
Rank 1
answered on 08 Sep 2015, 02:44 PM
Err i mean "server side"
0
Ivan Danchev
Telerik team
answered on 09 Sep 2015, 04:20 PM
Hello,

Yes, you can set a node's Target property server-side by accessing it in the RadNavigation's Nodes collection by index or finding it by Text/Url:
RadNavigation1.Nodes[0].Target = "_blank";
RadNavigation1.FindNodeByText("Root1").Target = "_blank";
RadNavigation1.FindNodeByUrl("http://www.telerik.com").Target = "_blank";

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Navigation
Asked by
Phil
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or