How to Disable Warning DataTables warning Requeste

2020-06-18 09:34发布

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

2条回答
我想做一个坏孩纸
2楼-- · 2020-06-18 10:04

Just add $.fn.dataTableExt.sErrMode = 'throw' to the page where DataTables will be placed.

查看更多
做个烂人
3楼-- · 2020-06-18 10:17
    $.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

查看更多
登录 后发表回答