Row Grouping For Multiple Columns
Row Grouping For Multiple Columns
Hello,
I am trying to group rows with multiple Columns.
Like with respect to this site example: With grouping of OFFICE I want to group AGE also.
ABCOffice - 22Age
Row 1
Row 2
XYZOffice - 42Age
Row 1
Row 2
I am not so good with JQuery Or Javascript but still I tried to write some code -
But Not working :)
api.column([2,3], { page: 'current' }).data().each(function (group, i) {
if (last !== group) {
$(rows).eq(i).before(
'<tr class="group"><td>' + group[0] + '</td><td colspan="4">' + group[1] + '</td></tr>'
);
last = group;
}
Can anyone suggest me how to cop up with this?