ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Issue with the footer column sum when using along with the grouping

Open vvardhanz opened this issue 11 years ago • 6 comments

I found footer column summing up all the vales not working appropriately when you using grouping based on rows. I have a column refunds where i have set aggregationType = uiGridConstants.aggregationTypes.sum and i have also used grouping with treeAggregationType = uiGridGroupingConstants.aggregation.SUM. Whats happening is footer column total is also adding up the group header total(Sum) resulting in value which is twice what it supposed to be. EX:
image In the above example footer column total should be 100 irrespective of the grouping Sum on column1 and column2. Its just an header, it shouldn't take the value of the header.

vvardhanz avatar Aug 13 '15 15:08 vvardhanz

+1 Can confirm. The way I sort of got around this was by manually adding up the data and setting the footerCellTemplate to the sum - but for some reason this broke header filters from showing.

coty-crg avatar Aug 13 '15 16:08 coty-crg

https://github.com/angular-ui/ui-grid/issues/3916

Don't use aggregationType. Just follow the grouping tutorial.

miah-al avatar Aug 18 '15 01:08 miah-al

I've also tried with treeAggregationType, and I get the same results as OP.

coty-crg avatar Aug 18 '15 14:08 coty-crg

Take a look at this

http://plnkr.co/edit/c0EIopXUgnoNQDyxzbot?p=preview

miah-al avatar Aug 18 '15 20:08 miah-al

+1

patriciocordova avatar Mar 14 '16 20:03 patriciocordova

Please see this @vvardhanz Grouping

Sampath-Lokuge avatar Aug 16 '16 05:08 Sampath-Lokuge