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

Open page when node selected...

3 Answers 150 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
influenceuk
Top achievements
Rank 1
influenceuk asked on 16 Nov 2009, 05:07 PM
Hi there,
I am new to the telerik controls and am testing the demo out at present. I would like some help if possible regarding the treeview control.

I am still undecided if i should purchase the asp.net control package or if i should just use the ones you get with asp.net ajax. These look promising though :)

Basically i would like to allow a user to select one of the nodes, which will in turn allow them to edit a page. Could someone give me some guidance on how to do this please? 

It's kind of similar to how umbraco allow users to edit pages. The page will load in a separate part of the page, depending on which node has been selected.

Hope i have explained it ok lol :)

Regards,
Alan

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Nov 2009, 11:28 AM
Hi Alan,

One suggestion is by using iframe to show the page and load the corresponding page in ' OnClientNodeClicked ' event of RadTreeView. Here is the example that I tried.

aspx:
 
    <telerik:RadTreeView ID="RadTreeView1" runat="server" OnClientNodeClicked="OnClientNodeClicked"
        <Nodes> 
         . . . 
        </Nodes> 
    </telerik:RadTreeView> 
    <iframe id="iframe1" height="400px" width="400px"
    </iframe> 

javascript:
 
<script type="text/javascript"
function OnClientNodeClicked(sender, args) 
    var selected = args.get_node().get_value(); // Get the clicked node value 
    var if1 = document.getElementById("iframe1"); 
    if1.src = selected + ".aspx"// set the url for iframe 
</script> 

Thanks,
Shinu.
0
influenceuk
Top achievements
Rank 1
answered on 01 Dec 2009, 02:26 PM
Thanks for your response.

I am actually trying to stay away from iframes. I would like to basically use the treeview as the layout of the site as i am writing a CMS. When a user click on the node it would then go off and load the edit page, and allow the user to edit the content.

I have seen this done on a number of other CMS's and on some other controls similar to RadControls. Just wondering if its possible or not
0
Veselin Vasilev
Telerik team
answered on 04 Dec 2009, 02:39 PM
Hi influenceuk,

Please find attached a sample project.

Regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
influenceuk
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
influenceuk
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or