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

2 posts, 1 answers
  1. tiffany
    tiffany avatar
    24 posts
    Member since:
    Jan 2014

    Posted 27 Jan 2014 Link to this post

    I know we can get treeview node's parent by this.parent(e.node). But how to get parent's parent? 

    Thank you.
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 29 Jan 2014 Link to this post

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