RadTreeView insert Node by Javascript

3 posts, 0 answers
  1. Vinoth
    Vinoth avatar
    25 posts
    Member since:
    Aug 2012

    Posted 23 Jun 2011 Link to this post

    Hi to all,

    I have an issue in Rad Tree view. I need to insert Node to present Tree view Find Parent and do that process by client Side any one Help me,


    How to Find parent Node and add child Node to that by Button Click.


    Thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jun 2011 Link to this post

    Hello Vinoth,

    Try the following client side code.

    Clientside:
    function Addparent()
       {
           treeView = $find("<%= RadTreeView1.ClientID %>");
           var selected = treeView.get_selectedNode();
           treeView.trackChanges();
           var newNode = new Telerik.Web.UI.RadTreeNode();
           newNode.set_text("I am New");
           newNode.set_value("123");
           var parent = selected.get_parent();
           parent.get_nodes().add(newNode);
           treeView.commitChanges();   
       }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gokul
    Gokul avatar
    1 posts
    Member since:
    Jun 2015

    Posted 10 Jun 2015 in reply to Shinu Link to this post

    Hi All,

            I want to add a sub node under each node which should contain only simple text instead of a link.

            For ex.

            Folder

            --------Node(Link)

            -----------------------Subnode(Plain text/Description).

            I am using JSP and js for this. Can anyone please help me out with this.

            Thanks in advance

            Gokul

Back to Top