How to catch dataTables before rendering
How to catch dataTables before rendering
jdadwilson
Posts: 127Questions: 30Answers: 1
One of the modules in my web-app allows the user to scroll by months to filter records from the database. For some months there may be no records. Is there a way to catch dataTables before the table is rendered so that it will not display the header and the its 'No data available for table' message and I can simply add a message such as 'No records found for the selected month'
jdadwilson
jdadwilson
This discussion has been closed.
Replies
'fnInitComplete': function(oSettings, json) {
if ( this.fnGetData().length === 0 ) {
$('#noRecords').show();
} else {
$('#invTable').show();
}
Works great.
jdadwilson