I have 2 data-table sharing the same jquery-dataTables-js because I cannot change it inside the JavaScript file, is there any alternate way that I can change it
I want to customize the default error message to my own.
No matching records found - We don't add anything yet No data available in table - no data of your choice.
simply remove dataSrc:"" from your ajax request. this worked for me in similar situation. Save this answer.
DataTable({bFilter: false, bInfo: false, paging: false}); It works fine.
You can also check if dataTable is empty using page.info() as described in this stackoverflow post.
The maximum number of rows that a DataTable can store is 16,777,216.
check this which sets your custom messages.
$(document).ready(function() {
$('#data_table_id').DataTable( {
"language": {
"lengthMenu": "Display -- records per page",
"zeroRecords": "No matching records found - We don't add anything yet No data available in table - no data of your choice.",
"infoEmpty": "No records available"
}
} );
} );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With