I'm using the jQuery datatables plugin with the rowGroup addon.
I need to use the 'startRender' function to display some information in the 'headline' of each group.
Links:
Datatables: https://datatables.net/
RowGroup Addon: https://datatables.net/extensions/rowgroup/examples/initialisation/startAndEndRender.html
But the problem is, that I cant read the row tr Id to get the needed data.
How can I access the row Id inside the startRender function to pass the data in the headline of the group?
Thats my jQuery rowGroup:
rowGroup: {
dataSrc: 1,
startRender: function ( rows, group ) {
var kundenId = table.row( this ).index();
var kundenDomainAnzahl = 1;
var kundenMaxDomainAnzahl = 2;
return group +' ( '+ kundenDomainAnzahl +' / '+ kundenMaxDomainAnzahl +' / '+ kundenId + ')';
}
}
And my table is filled by PHP vars, but in general the rows looks like this:
<tr id="number">
<td>Name</td>
<td>Type</td>
<td>Age</td>
</tr>