Cannot read property 'nTr' of undefined when clicking on next in pagination
Cannot read property 'nTr' of undefined when clicking on next in pagination
I get the above error when clicking on next for a datatable. Previous and last seem to be working fine. its only on clicking on next which is causing an issue. I am using 1.10.7 version of jquery datatable with bootstrap.min.js. Any help?
table = $('#searchResults').DataTable({
"autoWidth": false,
"smart": true,
"info": true,
"jQueryUI": true,
"lengthChange": true,
"paging": true,
"ordering": true,
"destroy": true,
"columnDefs": colDefs,
"paginationType": "full_numbers",
"data": response.d,
"columns": null,
"scrollX": true,
"scrollY": false,
"pageLength": "20",
"language": {
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": 'No entries to show',
"emptyTable": "Showing 0 to 0 of 0 records",
"sSearch": "Search all columns: ",
"infoFiltered": "(filtered from _MAX_ total records)",
"lengthMenu": "Display _MENU_ records per page"
},
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"dom": '<"H"lTfrRC>t<"F"ip>'
});
Answers
I had a semi-similar issue I think it spawns from passing a non-int to the iDisplayLength property. I am not for sure, but it looks like your passing a string?