row details using parent columns for child row (lined up with header columns)
row details using parent columns for child row (lined up with header columns)
Is it possible to have the row details in DataTables show data below but aligned with the parent columns? I notice that when I use row details with row.child( format(row.data()) ).show(); this will create another <tr> but then it will also add a <td colspan> which I do not want to happen.
I also attached a picture below to show that I would like January 12, 2016 to line up with the parent Date column, the Clientname lined up with parent Client column and so on....
if (row.child.isShown()) {
// This row is already open - close it
row.child.hide();
tr.removeClass('shown');
} else {
// Open this row
row.child( format(row.data()) ).show();
tr.addClass('shown');
}
function format ( d ) {
// d
is the original data object for the row
return '<tr>'+
'<td></td>'+
'<td></td>'+
'<td>January 12, 2016</td>'+
'<td>Clientname</td>'+
'<td>Projectname</td>'+
'<td>Taskname</td>'+
'</tr>';
}
Answers
Any updates about this?