8

I am using groupBy in ngTable, but now I need a further level of grouping in the table:

$scope.tableParams = new ngTableParams({
    count: 100,
    sorting: {
        PremiumElementGroup: 'desc',
        PremiumElement: 'desc',
        LegalEntity: 'asc',
        SettlementCurrency: 'asc'
    }
}, {
    counts: [],
    groupBy: 'PremiumElementGroup' <--- only allows one level of grouping...
    , getData: function ($defer, params) {
        var orderedData = $filter('orderBy')($scope.section.PremiumCessionOverrides, params.orderBy());
        $defer.resolve(orderedData);
    }
});

Is there something I can do to achieve what I want? Or another grid tool I could use?

tom redfern
  • 30,562
  • 14
  • 91
  • 126

1 Answers1

5

So far, there doesn't seem to be the possibility for group nesting up to multiple levels using ngTable.

However, you can use UI Grid which, according to their documentation allows nesting up to multiple levels.

At one example, their documentation says:

SubGrid nesting can be done upto multiple levels..

Side-note: You are asking for multi-level grouping or nested grouping where the title of the question is a bit misleading.

Bardh Lohaj
  • 1,402
  • 1
  • 9
  • 17
  • Thanks for that - you are correct, strictly I am asking about multi-level/nested grouping. I have changed title to reflect. – tom redfern Jan 31 '15 at 20:26
  • @TomRedfern have you successfully implemented Expandable UI Grid with more then 2 or 3 levels. If yes please share plunker or fiddle or detailed explanation would be really helpful! – ShaMoh Jun 27 '16 at 11:10
  • @ShaMoh - sorry to tell you I was not successful and had to create my own solution for this in the end, just using multiple level nesting of ng-repeat. – tom redfern Jun 27 '16 at 11:19
  • @TomRedfern it would be really helpful if you share the solutions. I tried in ng repeat but i cant able access the scope in that template file – ShaMoh Jun 27 '16 at 11:32
  • @ShaMoh - apologies it was in my last job so I can no longer access that source code... – tom redfern Jun 27 '16 at 12:41