How to group a set of group in datatables
How to group a set of group in datatables
I am looking for a way to group the set of groups. So for an example attached. I have two groups for CA and LT product class which is grouped based on product class. Now, I want if all the columns are having same value for CA and LT prod class, these will also be merged and looks like something in 3rd screenshot. showing product classes as ',' separated in Product class column in grouped row.
(https://datatables.net/forums/uploads/editor/6i/d5iucmd0xh3v.jpg "")
This question has an accepted answers - jump to answer
Answers
And I am using rowGroup extension for grouping data for the first time based on product class.
order: [
[0, 'asc']
],
rowGroup: {
dataSrc: 'prodClas',
startRender: function(rows, group) {
return $('<tr/>')
.append('<td colspan="13"><b>' + group + '<span display:inline-block; style="margin-right: 77.8%";> </span><button type="button" style="margin-left:0px;height: 200x;height: 23px;" class="btn btn-primary delete" id="delete">Add Term</button> </td>')
.attr('data-name', group);
}
},
This example from this thread may help, it's doing something similar,
Colin
Thanks @colin