I have used the below javascript to convert my table as a datatable:
<code>var table = $('#test').DataTable({
pageLength: 60,
paging: false,
searching: false,
bDestroy: true,
//fixedHeader: true,
//responsive: true,
orderFixed: [[0, 'desc']],
order: [[0, "desc"]],
columnDefs: [
{
target: 0,
visible: false
}
],
rowGroup: {
dataSrc: 0
}
});
</code>
<code>var table = $('#test').DataTable({
pageLength: 60,
paging: false,
searching: false,
bDestroy: true,
//fixedHeader: true,
//responsive: true,
orderFixed: [[0, 'desc']],
order: [[0, "desc"]],
columnDefs: [
{
target: 0,
visible: false
}
],
rowGroup: {
dataSrc: 0
}
});
</code>
var table = $('#test').DataTable({
pageLength: 60,
paging: false,
searching: false,
bDestroy: true,
//fixedHeader: true,
//responsive: true,
orderFixed: [[0, 'desc']],
order: [[0, "desc"]],
columnDefs: [
{
target: 0,
visible: false
}
],
rowGroup: {
dataSrc: 0
}
});
This creates the header as such:
The grouping is fine at dataSrc 0 which is correct, but I want to use the entire row 0 as the dataSrc and not just the first <td>
and greyed out — Is there anyway I can use the entire row as the group heading?
Or rather than grouping by the first column, can i group by every row with a class? the way my data is structured it includes Totals, which i would want included inside of the header
Have tried using the above code