FlexGrid apply [aggregate]="'Sum'" on certain rows

Posted by: muhammad.f.mehboob on 1 February 2021, 2:50 am EST

    • Post Options:
    • Link

    Posted 1 February 2021, 2:50 am EST - Updated 3 October 2022, 2:35 pm EST

    Hi Team,

    I only want to aggregate last two rows of my grid. How do I apply [aggregate]=“‘Sum’” on certain number of rows based on condition? By default it applies to all rows.

    Thank you.

  • Posted 2 February 2021, 1:47 am EST

    Hi,

    You can override the getAggregate method of the CollectionView to only aggregate the last two rows:

    https://stackblitz.com/edit/angular-9-0-0-rc-1-h2xouz

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels