addAggregationMenu = function(type, title) {
          title = title || i18nService.get().grouping['aggregate_' + type] || type;
          var menuItem = {
            name: 'ui.grid.grouping.aggregate' + type,
            title: title,
            shown: function () {
              return typeof(this.context.col.treeAggregation) === 'undefined' ||
                     typeof(this.context.col.treeAggregation.type) === 'undefined' ||
                     this.context.col.treeAggregation.type !== type;
            },
            action: function () {
              service.aggregateColumn( this.context.col.grid, this.context.col, type);
            }
          };

          if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.aggregate' + type)) {
            col.menuItems.push(menuItem);
          }
        }
@ngdoc object
 @name grouping
 @propertyOf  ui.grid.grouping.api:ColumnDef
 @description Set the grouping for a column.  Format is:
 ```
   {
     groupPriority: <number, starts at 0, if less than 0 or undefined then we're aggregating in this column>
   }
 ```

 **Note that aggregation used to be included in grouping, but is now separately set on the column via treeAggregation
 setting in treeBase**

 We group in the priority order given, this will also put these columns to the high order of the sort irrespective
 of the sort priority given them.  If there is no sort defined then we sort ascending, if there is a sort defined then
 we use that sort.

 If the groupPriority is undefined or less than 0, then we expect to be aggregating, and we look at the
 aggregation types to determine what sort of aggregation we can do.  Values are in the constants file, but
 include SUM, COUNT, MAX, MIN

 groupPriorities should generally be sequential, if they're not then the next time getGrouping is called
 we'll renumber them to be sequential.
 <br/>Defaults to undefined.