0

Can you tell me how to set a footer template on Angular UI grid when group feature is enabled ?

Here is the Plunker.

I have tried like this.But it's not working.I need to set a Total Properties on the Balance column.

footerCellTemplate: '<div class="ui-grid-cell-contents">Total Properties 
{{customTreeAggregationFinalizerFn: function (aggregation) { 
aggregation.rendered = aggregation.value; }}} </div>', treeAggregationType: 
uiGridGroupingConstants.aggregation.COUNT

Update :

This is working when for simple aggregation where without Groping.But how can I use it with the Grouping ?

{ field: 'balance',  footerCellTemplate: '<div class="ui-grid-cell-
contents">Total Properties {{col.getAggregationValue() | number:2 }}</div>', 
aggregationType: uiGridConstants.aggregationTypes.count}
Sampath
  • 63,341
  • 64
  • 307
  • 441

1 Answers1

0

You can just set aggregationLabel property on the column to add the "Total Properties"

  { name: 'balance', width: '45%', cellFilter: 'currency', treeAggregationType: uiGridGroupingConstants.aggregation.AVG, customTreeAggregationFinalizerFn: function( aggregation ) {
        aggregation.rendered = aggregation.value;
      },aggregationLabel : "Total Properties : " }
Kathir
  • 6,136
  • 8
  • 36
  • 67