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

Open URL by doubleclicking treeview item

1 Answer 92 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frode
Top achievements
Rank 1
Frode asked on 11 May 2010, 11:13 AM
Hi, I'm using the Telerik TreeView for ASP.NET MVC to display companies in a treestructure.
It is using LoadOnDemand and retrieves items by binding to an actionmethod.

I want to be able to doubleclick (or otherwise select a company) and open a URL. I tried using the NavigateURL property on the TreeViewItemModel, but nothing happens.

How can I open a URL by selecting one of the tree nodes?

1 Answer, 1 is accepted

Sort by
0
telaron
Top achievements
Rank 1
answered on 19 May 2010, 04:37 AM
Hi mate,

I've had exactly the same problem and I found out that Telerik code does not operate with NavigateUrl attribute at all.
I've solved this problem modifying the line of code in telerik.treeview.js file (in my version the line number is 555):

html.cat(item.NavigateUrl ? '<a class="t-link t-in">' : '<span class="t-in">');

to this one:

html.cat(item.NavigateUrl ? '<a class="t-link t-in" href="' + item.NavigateUrl + '">' : '<span class="t-in">');


Hope it'll help you.

Tags
TreeView
Asked by
Frode
Top achievements
Rank 1
Answers by
telaron
Top achievements
Rank 1
Share this question
or