user2863388
user2863388

Reputation: 21

angular ng-grid can we just allow to group some columns and let other columns not to be groupable

in my grid option, I let showGroupPanel: true So the grid can group all columns but I only want to group some of them. Is there any way to deal with this problem?

Upvotes: 1

Views: 1021

Answers (1)

magumbo
magumbo

Reputation: 63

As per their docs you can change the default value 'groupable' to false in your column definition. Something like this:

$scope.gridOptions = { 
    data: 'myData',
    showGroupPanel: true,
    columnDefs: [{field:'Name', displayName:'Col Name', groupable: false}, 
                 {field:'Value', displayName:'Value', groupable: true}]
    };

Upvotes: 1

Related Questions