row details page load
row details page load
alord84
Posts: 24Questions: 15Answers: 1
Tohave the row details expand on page load - is that possible?
````
$('#example tbody').on('pageload', 'td.details-control', function () {
var tr = $(this).closest('tr');
var row = table.row( tr );
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');
}
} );
```
This discussion has been closed.
Answers
any suggestions here?
Your code there looks okay as far as I can tell. Can you link to the page so it can be debugged please.
Allan
Here is what I wanted, works fine now for -> Row details - opening nth Row.