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

how to get treeview node's parent node's parent ?

1 Answer 839 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
tiffany
Top achievements
Rank 1
tiffany asked on 27 Jan 2014, 11:35 PM
I know we can get treeview node's parent by this.parent(e.node). But how to get parent's parent? 

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 29 Jan 2014, 12:01 PM
Hi Sai,

In order to achieve this you could use the treeView parent() method:
//get reference to the TreeView widget
var treeview = $("#treeview").data("kendoTreeView");
//get the parent of an element with text "bar"
var parent = treeview.parent(treeview.findByText("bar"));
//get the parent of the parent of an element with text "bar"
treeview.parent(parent);

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
tiffany
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or