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
40
Expand / collapse in hierarchical grid – client method
posted

Hello

I use a hierarchical grid and very simple I can expand / collapse from server side: ExpandAll(true) / ExpandAll(false). You know any solution to do this expand / collapse from client side? I don’t find any method in documentation.

Regards,

Mihai

  • 5118
    posted

    Hello Mihai,

     I've never seen a method on the client side to do this... instead just loop through the rows you want to expand and call setExpanded(true) on them.  Similar to the following:

    function WebImageButton1_Click(oButton, oEvent){

        var grid = igtbl_getGridById(myGridName);

        for (var i = 0; i < grid.Rows.length; i++){

            row = grid.Rows.getRow(i);

            row.setExpanded(true);

        }

    }

    var myGridName;

    function UltraWebGrid1_InitializeLayoutHandler(gridName){

        myGridName = gridName;

    }