tableid= Importhistory-Requested unknown parameter 'file' for row 0 ,column 0
tableid= Importhistory-Requested unknown parameter 'file' for row 0 ,column 0
mt9108
Posts: 3Questions: 2Answers: 0
Hi All
I am facing this warning eventhougn the no.of colums match in the table.Could you please help on this.
HTML -
var dataset = getProspectdata();
alert(dataset);
$(document).ready(function () {
$('#Importhistory').dataTable({
data: dataset,
"columns": [
{"data": "file"},
{"data": "dstatus" },
{"data": "proc" },
{"data": "dscrubbed" },
{"data": "create" },
]
});
});
========
dataset output from the function is as below:(JavaScript)
[
{ "file": "Sourcefile", "dstatus": "Scrubbed", "proc": "Scrubbed", "dscrubbed": "4/28/2017 2:37 PM", "create": "4/28/2017 2:37 PM" },
];
but I am facing the error.
Please help on this.
This discussion has been closed.
Answers
but when I hard code the data as below: it is working fine
var dataset = [
{ "file": "Sourcefile", "dstatus": "Scrubbed", "proc": "Scrubbed", "dscrubbed": "4/28/2017 2:37 PM", "create": "4/28/2017 2:37 PM" },
I am facing issue only if I am getting data from the function from javascript as mentioned above.
Does
getProspectdata
make an Ajax call? Keep in mind what the firsta
in Ajax stands for! It is async.You'd need to have a callback that will pass the data to DataTables. Or just have DataTables do the Ajax call for you.
Allan