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

RadTreeView insert Node by Javascript

2 Answers 201 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Vinoth Arun
Top achievements
Rank 2
Vinoth Arun asked on 23 Jun 2011, 02:33 PM
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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jun 2011, 04:17 PM
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.
0
Gokul
Top achievements
Rank 1
answered on 10 Jun 2015, 05:36 AM

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

Tags
TreeView
Asked by
Vinoth Arun
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Gokul
Top achievements
Rank 1
Share this question
or