Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove aggregation menu items from angularjs ui-grid menu

The ui-grid example on the official website ( http://ui-grid.info/docs/#/tutorial/209_grouping ) presents a grouping feature, which looks like this: enter image description here

I would like to have the Grouping menu item, but not have the Aggregate ones (count, sum, max, min, avg) in the column menu and I couldn't find a way around removing them.

A solution I've tried was overriding the uiGridGroupingService, by providing a decorator for the groupingColumnBuilder, but the service is not resolved at all and I can't help but wonder if there is a simpler way of achieving this.

Is anyone aware of any solution for this problem?

like image 542
Cristina_eGold Avatar asked May 20 '15 14:05

Cristina_eGold


1 Answers

It's set to true by default so you need to specify it in your columnDefs

groupingShowAggregationMenu: false

like image 183
SirArthurMoney Avatar answered Sep 20 '22 05:09

SirArthurMoney