Expand ancestors

2 posts, 0 answers
  1. Alyssa
    Alyssa avatar
    24 posts
    Member since:
    Oct 2013

    Posted 19 Jun 2014 Link to this post

    I have a treeview and a textbox for search. I am able to get the searched node from the treeview. But I need to expand all the ancestors of that node.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jun 2014 in reply to Alyssa Link to this post

    Hi Alyssa,

    Try the following javascript function to expand ancestor nodes.

    function expandAllAncestors(node) {
           if (node.get_expanded() !== true)
               if (node.get_level() != 0) {

Back to Top