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
50
Display Expansion Icon in igx-Hierarchical grid only on data present in child with flag
posted

Hi All,

I have a requirement where i need to display hiererchical grid which has child data and will be displayed on click of the parent grid.

Now, i Don't want to show the expansion panel for the rows which donot have child in it.

To indicate that, i have a flag with true and false to identify whether there is data in child in parent grid.

Can anyone help on this with example, on how can we do this .

Little help would be very much helpful.

Thanks,

Subham

Parents Reply
  • 1320
    Offline posted in reply to Subham Karan

    Hello Subham,

     

    I have prepared sample, demonstrating how to hide the expand icon for rows that don’t have children. In the method show, I set a variable hasData to true or false, depending on the row’s children. There you can use your boolean variable. Then I have used a template for the collapsedIndicator and the template looks like this:

    <ng-template igxRowCollapsedIndicator let-row>

    <igx-icon fontSet="material" [style.visibility]='show(row) ? "visible" : "hidden"'>keyboard_arrow_right</igx-icon>

    </ng-template>

     

    This way you would see the icon only if the child grid is not empty.

    Please let me know if you need additional information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

Children