Menu

datatables_table_0 - requested unknown parameter

While working with DataTable we may encounter some issues, and because of that on the load of DataTable we are seeing an alert that says "datatables warning: table id=datatables_table_0 - requested unknown parameter '<columnName>' for row 0, column 3". For me, this alert was showing because all the JSON objects which we were providing to create the table don't have consistent properties. In few objects column3 was present but in few column3 property is not present. To identify the issue with the column you may verify the column number mentioned in the alert and the same column number that we mentioned in the aoColumns(as showing in the below code snippet).

aoColumns: [
{ mData: 'column1' },
{ mData: 'column2' },
{ mData: 'column3' }]

After adding the column3 property in all objects data table start working perfectly.

Hope this helps you to investigate the data table issue.

No comments:

Post a Comment