deferRender not working
deferRender not working
measterbro
Posts: 33Questions: 9Answers: 0
I have a table on a webpage with 3000 records and 58 columns that is taking 1:45 to render on the page. I have tried using "deferRender" but it doesn't make any difference.
$(document).ready(function () {
$('#example').DataTable({
"deferRender": true,
"dom": '<"top"Bif>rt<"bottom"flp><"clear">',
"buttons": [
{
extend: 'excelHtml5',
text: '<i class="fa fa-files-o">Click here to export two years of data to Excel</i>',
titleAttr: 'Export'
}
],
"columnDefs": [
{ "orderSequence": [ "asc", "desc" ], "targets": [ 0,1 ] },
{ "orderSequence": [ "desc", "asc" ], "targets": [ '_all' ] }
],
"fixedHeader": [
{"header": true},
{"headerOffset": $('#fixed').height()},
{"headerOffset": 50}],
"pageLength": 50,
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
});
});
This discussion has been closed.
Replies
It looks like you are using HTML sourced data.
deferRender
only works with ajax or Javascript sourced data.Not sure how you are loading your HTML table but can you change it so you can use either the
ajax
ordata
options?Kevin