Disable sorting if no record in table
Hello.I have one single page application with binding data to table.
For sorting, searching, paging I have used
$('#tblActionHistory').DataTable({
"autoWidth": false,
"processing": true,
"paging": true,
"pageLength": 5,
//"ordering": true,
"ordering": true,
columnDefs: [
{ type: 'date-uk', targets: 3 }
],
"info": true,
"bFilter": false
});
Here, I have requirement that, if record count is 0, sorting and other events gets disabled.
How to do that.