No tfoot after .destroy()
No tfoot after .destroy()
mi1
Posts: 1Questions: 1Answers: 0
Hi,
i dynamically create my table and therefor I empty and destroy it everytime i recreate the table:
But when i recreate my table i don't have a footer anymore.
My original html:
<table id="quotaTable" class="table table-striped table-bordered dataTable compact table-condensed" cellspacing="0" width="100%">
<thead><tr><th></th></tr></thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
The function to recreate the table:
function recreateTable(json) {
quotaTable.destroy();
$('#quotaTable').empty();
quotaTable= $('#quotaTable').DataTable({
"dom": 'lrtip',
columns: json.columns,
data: json.rows,
"paging": false,
"searching": true,
"info": false,
"processing": false,
"columnDefs": [
{
"visible": false,
"targets": [0]
}
],
"footerCallback": function (row, data, start, end, display) {
var api = this.api(), data;
/*
Stuff that should be done!
*/
}
});
}
Is there a possibility to add a footer in the DataTable-Constructor?
This discussion has been closed.