supress datatable warning

supress datatable warning

vikvik Posts: 2Questions: 1Answers: 0

hi Alan,

I would want to supress the data
DataTables warning: table id=myTable - Requested unknown parameter 'column2' for row 0. For more information about this error, please see http://datatables.net/tn/4.
I am getting the data from a server. The server does not have the value of certain columns for a few rows that is by design and I can show a blank or NA.
How do i compress the alert message warning?
I tried using $.fn.dataTableExt.sErrMode = 'throw'; and $.fn.dataTableExt.sErrMode = 'mute';
The exception is not thrown but when I reload the table by clicking a button again it is not working.
Note I am using the orthogonal data but I am using my custom method to load data from server and fill the table which is a orthogonal data.

Regards
Vikraman

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    I would suggest, rather than muting the error message (which is there for a reason - there is an error, and that shouldn't be ignored), the issue that is triggering the error be addressed. If there is no column2 parameter in the data, but it is expected, then use columns.defaultContent to tell DataTables what to show instead, as noted in the tech note the error message refers to.

    Allan

This discussion has been closed.