问题
I have two rows within my datatables as follows.
<tr><td></td><td></td><td></td></tr>
<tr><td colspan="3"></td></tr>
These rows repeat themselves for every record on datatables. So as you can imagine, I get this error all the time and just need it disabled unless you want to figure out how to make it work.
So how do you disable the warning: DataTables warning Requested unknown parameter from the data source for row
回答1:
$.fn.dataTable.ext.errMode = 'none';
$('#table').on( 'error.dt', function ( e, settings, techNote, message ) {
console.log( 'An error has been reported by DataTables: ', message );
} ) ;
Above code will solve problem and also log error in console so you can solve the error
回答2:
Just add $.fn.dataTableExt.sErrMode = 'throw'
to the page where DataTables will be placed.
来源:https://stackoverflow.com/questions/18007630/how-to-disable-warning-datatables-warning-requested-unknown-parameter-from-the-d