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

Navigation of Tree Nodes

1 Answer 67 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Yuvarajan
Top achievements
Rank 1
Yuvarajan asked on 15 Feb 2013, 05:36 AM
Hi,

I have searched the web and the forums but I just don't get how to do this. 
I load a tree from a data source and each tree element .
My requirement is to move the selected item in the tree view to root element.
Consider an example
A
A.1
A.2
A.3
B
B.1
B.2
B.3

Here i was  selected  B.3  the B wants to  move to first root element in tree view  
It should be so easy but I just don't get it.

Thanks in advance,

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 18 Feb 2013, 02:39 PM
Hi Yuvarajan,

 
You can use the TreeView API to  get the currently selected node and append it to the top level of the TreeView in the following way:

function moveNode() {
    treeView = $("#treeview").data("kendoTreeView");
 
    //get the selected node and append it to the top level
    treeView.append(treeView.select());
}
Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Yuvarajan
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or