我在ngTable使用GROUPBY,但現在我需要在分組表中的另一水平:ngTable多層次或嵌套分組
$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);
}
});
有什麼我可以做,以達到我想要什麼?或者我可以使用另一個網格工具?
也許在'groupBy'屬性中使用回調? – 2014-11-06 16:05:37
@KostiaMololkin我看了一下回調示例,它似乎將groupby設置爲某個函數的返回值。這將如何幫助我實現多層次分組? – 2014-11-06 16:15:25