Hello,
I am looking for some help to avoid the warning -
DataTables warning (table id = 'someTypeTable'): Requested unknown parameter '0' from the data source for row 0 - when am rendering the column(s) using the mRender option.
Versions used as below:
DataTables v1.9.4
jQuery v1.7.1
jQueryUI v1.8.11
Scenarios as below:
Scenario 1:
When am trying to render couple of columns using mRender in order to show a radio button (in one column) and a concatenated information in another column, as below, am getting the warning:
Scenario 2:
If I am rendering the datatable with a well-formed json data using mData, it is working fine.
Sample jsonData as below:
{"someTypes":
[
{"notes":"N/A","someTypeId":3,"dimensions":"100x100x100","uom":"mm","someTitle":"Steel Box w/ ABC, XYZ 1000"},
{"notes":"N/A","someTypeId":4,"dimensions":"1200x800x145","uom":"mm","someTitle":"WOOD-SQR-STUFF, 100 x 100"},
{"notes":"Height Varies","someTypeId":5,"dimensions":"1130x1200xXXXX","uom":"mm","someTitle":"Plastic & Wool BOX 130x120"}
]}
Please let me know what has to be done to avoid this error or is there a way to suppress the warning.
Thanks,
Uresh
I am looking for some help to avoid the warning -
DataTables warning (table id = 'someTypeTable'): Requested unknown parameter '0' from the data source for row 0 - when am rendering the column(s) using the mRender option.
Versions used as below:
DataTables v1.9.4
jQuery v1.7.1
jQueryUI v1.8.11
Scenarios as below:
Scenario 1:
When am trying to render couple of columns using mRender in order to show a radio button (in one column) and a concatenated information in another column, as below, am getting the warning:
DataTables warning (table id = 'someTypeTable'): Requested unknown parameter '0' from the data source for row 0
someTypeDataTable = $("#someTypeTable").dataTable({ iDisplayLength: 25, aaData: jsonData["someTypes"], aoColumns:[ {"mRender":function(data, type, row){ //console.log(data, ' - ', type, ' - ', row); var radioBtn = "<input type='radio' name='someTypeId' value='"; radioBtn += row.someTypeId; radioBtn += "'/>"; return radioBtn; }}, {"mData":"someTitle"}, {"mRender":function(data, type, full){ var dimension = full.dimensions + "	" + full.uom; return dimension; }}, {"mData": "notes"} ], bProcessing: true, bRetrieve: true });
Scenario 2:
If I am rendering the datatable with a well-formed json data using mData, it is working fine.
someTypeDataTable = $("#someTypeTable").dataTable({ iDisplayLength: 25, aaData: jsonData["someTypes"], aoColumns:[ {"mData": "someTypeId"}, {"mData": "someTitle"}, {"mData": "dimensions"}, {"mData": "notes"} ], bProcessing: true, bRetrieve: true });
Sample jsonData as below:
{"someTypes":
[
{"notes":"N/A","someTypeId":3,"dimensions":"100x100x100","uom":"mm","someTitle":"Steel Box w/ ABC, XYZ 1000"},
{"notes":"N/A","someTypeId":4,"dimensions":"1200x800x145","uom":"mm","someTitle":"WOOD-SQR-STUFF, 100 x 100"},
{"notes":"Height Varies","someTypeId":5,"dimensions":"1130x1200xXXXX","uom":"mm","someTitle":"Plastic & Wool BOX 130x120"}
]}
Please let me know what has to be done to avoid this error or is there a way to suppress the warning.
Thanks,
Uresh