Open page when node selected...

4 posts, 0 answers
  1. influenceuk
    influenceuk avatar
    2 posts
    Member since:
    Nov 2009

    Posted 16 Nov 2009 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Nov 2009 Link to this post

    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.
  3. influenceuk
    influenceuk avatar
    2 posts
    Member since:
    Nov 2009

    Posted 01 Dec 2009 Link to this post

    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
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 04 Dec 2009 Link to this post

    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.
Back to Top