This is a migrated thread and some comments may be shown as answers.
Item Target
2 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nathan Taylor
Top achievements
Rank 1
Nathan Taylor asked on 10 Jun 2010, 12:42 AM
For nodes which have a Url how do I set the target window in which to open the link?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Jun 2010, 07:55 AM
Hello Nathan Taylor,

Use the LinkHtmlAttributes and set the target:

item.Add().Text("ASP.NET MVC").Url("http://www.telerik.com")
.LinkHtmlAttributes(new {target="_blank"});
Regards,
Atanas Korchev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Nathan Taylor
Top achievements
Rank 1
answered on 10 Jun 2010, 08:13 AM
Excellent. Thank you.

Update
---------------
After reviewing what you posted, I guess I must be missing something because the LinkHtmlAttributes property on TreeViewItem only has a getter and no setter. In fact, I'm not even sure where the code you posted would be used- what is the actual type of "item"?

new TreeViewItem() { 
    Text = pathItem.Name, 
    Value = pathItem.FullPath, 
    Url = (pathItem is FileItem) ? pathItem.FullPath : null
    LoadOnDemand = (pathItem is DirectoryItem), 
    Enabled = true

Tags
TreeView
Asked by
Nathan Taylor
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Nathan Taylor
Top achievements
Rank 1
Share this question
or