requested unknown parameter '0' for row 0
requested unknown parameter '0' for row 0
kvn9328
Posts: 18Questions: 7Answers: 0
Hi,
I am getting the unknow paramter error for the below code:
$('#ajaxGroup').dataTable({
"processing": true,
"serverSide": true,
"ordering": false,
"searching": false,
"destroy": true,
"ajax":{
"url":"ajax-groupView.html",
"data": function(d) {d.SearchCriteria = id[1];},
"columns": [{"data":"id"}]
}
});
<div id="groupTree" style="overflow: auto">
<table id="ajaxGroup">
<thead>
<tr>
<th>id</th>
</tr>
</thead>
</table>
</div>
My response:
{"recordsTotal":1,"recordsFiltered":1,"draw":1,"data":[
{"auditDate":null,"id":2,"created":1415029961000,"lastUpdated":1415653500032,"transactionStatus":"ERROR","deliveryStatus":"NONE","functionalTrxnStatus":null,"billingCount":1]}
I figured out that this error happens when datatable is trying to access array 0 for loading cell. But i dont see anything from my response, where i am missing.
Could you please look at the above snippet and let me know what i am missing?
Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Reformatting the code makes the problem apparent:
columns
is currently nested underajax
which is shouldn't be.Allan