Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
Expand row programmatically
posted

I have a hierarchical grid in which my child grid has some links showing some details. Once I hit back or (use bread crumbs) and go back to my main grid, I want the row to expand automatically. I see there is nothing to preserver this value, so trying to achieve it programmatically. My problem is I am not able to expand the child row by default. I tried to use sample code but its not working.

       

var parentGrid = $("#baGrid").igHierarchicalGrid("rootWidget"),

            rowDomElement = parentGrid.allRows()[0];

        $(".selector").igHierarchicalGrid("expand", rowDomElement);

  • 23953
    Suggested Answer
    Offline posted

    Hello HHH,

    You're on the right track. Just change the ".selector" in the third line of your code with your grid id selector which is "#baGrid".

    Here is the final code:

    var parentGrid = $("#baGrid").igHierarchicalGrid("rootWidget"),

    rowDomElement = parentGrid.allRows()[0];

    $("#baGrid").igHierarchicalGrid("expand", rowDomElement);


    Best regards,
    Martin Pavlov
    Infragistics, Inc.