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

[Solved] One click paste as link from TreeView?

4 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 21 Apr 2008, 10:13 AM
Hi,

I am looking for a way to browse a document library in SharePoint in order to create a link from a document to Wiki article. So within a wiki article I'd like the user to open TreeView, locate the document, and select it to paste a link of that document into the specified field. Is that possible with TreeView?

I know I can do this via copy and paste into the link dialogue box but I want to make the process as seamless as possible with as few clicks as possible. 

Thanks very much in advance.

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Apr 2008, 08:27 AM
Hello Tim,

You can get the NavigateUrl value on the client like this:

 function OnClientNodeClickingHandler(sender, eventArgs)  
        {  
            var nodeUrl = eventArgs.get_node().get_navigateUrl();  
            alert(nodeUrl);  
        } 


<telerik:RadTreeView ID="RadTreeView1" OnClientNodeClicking="OnClientNodeClickingHandler" runat="server">  
 

Is this what you need?

All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tim
Top achievements
Rank 1
answered on 23 Apr 2008, 01:40 PM

Thanks Peter, yes your response does help, but only partially.

What I had planned to do was link TreeView to a field named RelatedArticle. When a user is creating a new artcile and wants to create a link from a related article to the new one (as they might do in a knowledge base) I had planned to use TreeView as the picker. By browsing the list of available articles, locating the desired one, and right-mousing clicking the article node to select (say) "Link Article" from the TreeView menu. Your code demonstrates that you can identify the node (article) URL, but now I am wondering if it can be programmed to pass that URL from the selected node to a target field?

Is that clearer?

All the best

Tim

0
Peter
Telerik team
answered on 23 Apr 2008, 02:55 PM
Hello Tim,

Please, find attached a small demo page which demonstrates what I believe you need to achieve. Let me know if this helps.



Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Peter
Telerik team
answered on 23 Apr 2008, 03:16 PM
Hi Tim,

Probably you are viewing the test page with IE 6 browser, because we were able to experience the problem only after we used this browser. If that's the case, you can go ahead and use the following fix:
<style type="text/css">  
  .level2 .text { padding-right: 0 !important; }  
</style> 



Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Peter
Telerik team
Tim
Top achievements
Rank 1
Share this question
or