Clear Cell Value On Group Rows

Posted by: grapecity on 11 October 2017, 5:37 am EST

    • Post Options:
    • Link

    Posted 11 October 2017, 5:37 am EST

    I have a grid with group rows and column aggreagte = “Sum”. Therefore these columns on group rows will show Sum Total. In case the column contains no data, the group row show Zero (0) as the sum. This is perfect but is there a way where I can choose to show nothing instead of number zero on the cell. Thank you very much.

  • Posted 12 October 2017, 5:42 pm EST

    Hi Hoang,

    You can hide/style aggregate value in GroupHeader, using wjFlexGridCellTemplate for column.

    Please refer to the Documentation for the same.

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo-wijmo.angular2.grid.WjFlexGridCellTemplate.Class.html

    You can also use itemFormatter/formatItem for the same if you would not like to use wjFlexGridCellTemplate.

    ~Manish

  • Posted 13 October 2017, 3:12 am EST

    Because I use “autoGenerateColumns = true”, therefore all formatting is handling through initialized, loadedRows, and formatItems event. I do not use wjFlexGridCellTemplate . Can you give me an example on how to hide/style aggregate value in GroupHeader in formatItem. If you can, I would like to see also example of wjFlexGridCellTemplate for future reference. Thank you sir very much.

  • Posted 15 October 2017, 7:51 pm EST

    Hi,

    Here is a small fiddle -http://jsfiddle.net/63n5x1ou/

    which shows you how to format the GroupHeader using ItemFormatter, we have changed the value for aggregate column Sales. Let me know if you face any issues.

    Thanks,

    Abhishek

  • Posted 17 October 2017, 8:28 am EST

    Thank you Abhishek. It is working like a charm sir.

Need extra support?

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

Learn More

Forum Channels