Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ngTable multi-level or nested grouping

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?

like image 884
tom redfern Avatar asked Nov 06 '14 15:11

tom redfern


1 Answers

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.

like image 135
Bardh Lohaj Avatar answered Oct 22 '22 14:10

Bardh Lohaj