DataTables warning: Requested unknown parameter ‘0’ from the data source for row ‘0’

For null or undefined value error, Just add this line to attributes : ,columnDefs: [ { "defaultContent": "-", "targets": "_all" } ]

Example :

oTable = $("#bigtable").dataTable({
  columnDefs: [{
    "defaultContent": "-",
    "targets": "_all"
  }]
});

The alert box will not show again, any empty values will be replaced with what you specified.

Leave a Comment