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
555
How to expand all child bands
posted

Hi,

I have 3 bands of hierarchy in my grid. I am able to expand the first level but not able to expand the second level. I want my grid to look like below:

-R1

  - T1

       P1

But what I see is:

- R1

  + T1

I am using the following code:

function expandAllRowsOfGrid()

{

 // get the top level grid

var parentGrid = $("#igGrid").igHierarchicalGrid("rootWidget");

$(parentGrid.allRows()).each(function (index, element) {

     $("#igGrid").igHierarchicalGrid("expand", element);

     $(element).children().each(function (indexChild, elementChild) {

        $(element).igHierarchicalGrid("expand", elementChild);

          });

 });

}

$(element).igHierarchicalGrid("expand", elementChild); throws an exception.

Can you please suggest the correct way to open the second level.

Regards

S