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

    • Post Options:
    • Link

    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

  • Posted 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

  • Posted 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.

  • Posted 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

  • Posted 26 June 2022, 7:47 pm EST

    Thank you very much !!

  • Posted 22 November 2022, 2:24 pm EST

    Hi Sonu,

    I have posted a question related to changing of flexgrid row color, can u please look into it

  • Posted 22 November 2022, 3:35 pm EST

    Hi,

    I have answered your question regarding the flexGrid row color changing, please refer to the following thread for the same - https://www.grapecity.com/forums/wijmo/how-to-change-the-background-color-of-a-row-in-flexgrid-from-typescript

    ~Vivek Pannu

Need extra support?

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

Learn More

Forum Channels