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

Footer aggregation totals not showing

Open miah-al opened this issue 11 years ago • 9 comments

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

In this plunkr from the tutorial (Complex Grouping) I have just removed the initial grouping. Still shows nothing in the total. But as soon as I click a cell to edit, the totals show up.

Thanks..

miah-al avatar Jul 02 '15 12:07 miah-al

after data is fetched, doing the following fixes the issue. Not pretty but I will use it until this is fixed.

$scope.gridApi.grouping.clearGrouping(); $scope.gridApi.grouping.groupColumn('balance'); $scope.gridApi.grouping.clearGrouping();

miah-al avatar Jul 02 '15 19:07 miah-al

It probably means we're missing a notifyDataChange somewhere, so the grid isn't noticing that we changed something. Looks like it's doing it on data load, so presumably the aggregations aren't being recalculated on modify rows. Interesting.

PaulL1 avatar Jul 02 '15 20:07 PaulL1

Even i am facing the similar issue. This feature is one of the requirement of the project and I am stuck. Is it been resolved or any work around to fix it?. I tried the workaround provided by alam123 but it dint work for me.

Thanks..

kunalsavla avatar Aug 12 '15 19:08 kunalsavla

Did you use the correct column name in the groupColumn function?

miah-al avatar Aug 13 '15 22:08 miah-al

Yes, I gave the correct name. Can you please provide the plunkr so that I can see what I am missing... Thanks

kunalsavla avatar Aug 14 '15 02:08 kunalsavla

I am facing similar issue with footer column not showing up. Here is the plunker http://plnkr.co/edit/MeMrzlhdVvU3bpnFeai4?p=preview

vvardhanz avatar Aug 14 '15 13:08 vvardhanz

@alam123 can you please share the workaround mention above to resolve the issue with an example. Thanks

kunalsavla avatar Aug 18 '15 07:08 kunalsavla

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

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

@alam123 thanks for the example. I did the following changes and it worked for me. I am not doing grouping-un grouping. Just adding below line to each column definition works.

customTreeAggregationFinalizerFn: function( aggregation ) { aggregation.rendered = aggregation.type + ': '+ aggregation.value; $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.EDIT); }

kunalsavla avatar Aug 20 '15 12:08 kunalsavla