How to create an extra aggregate row in flex grid which shows sum

Posted by: rakesh.thummanapelly on 21 June 2022, 11:48 pm EST

  • Posted 21 June 2022, 11:48 pm EST

    How to create an extra aggregate row which has sum of total items irrespective of grid filtering
  • Replied 22 June 2022, 7:49 pm EST

    Hello,

    You may use the getAggregate() method of Wijmo to get the aggregate of the desired column irrespective of filtering and insert the value into the columnFooter row cells by handling formatItem event of FlexGrid. Please refer to the sample link below demonstrating the same:

    https://stackblitz.com/edit/js-tvnvxf?file=index.js

    Regards
  • Replied 23 June 2022, 2:23 pm EST

    Hi Thanks for the response.

    Can we make the aggregate row (bottomLeft cell) clickable so that we would have a single aggregate row to toggle between showing filtered sum and Total sum.
  • Marked as Answer

    Replied 23 June 2022, 11:21 pm EST

    Hello,

    Yes, you can add a click event on FlexGrid hostElement and toggle the visible property of the bottom total row. Please refer to the code snippet and sample link below demonstrating the same:

    https://stackblitz.com/edit/js-bsrcze?file=index.js

    Regards
    Sonu Kumar Pandey
  • Replied 26 June 2022, 7:47 pm EST

    Thank you very much !!
Need extra support?

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

Learn More

Forum Channels