Requested unknown parameter 0 column 0 and row 0 (server side json object)
Requested unknown parameter 0 column 0 and row 0 (server side json object)
lestary
Posts: 4Questions: 0Answers: 0
Hi,
i have json object from my web service like below
{
"obj": [
{
"bytebit": "112.4",
"datatype": "Bool",
"name": "paa_sw_unit_comunication_lost"
},
{
"bytebit": "131.1",
"datatype": "Bool",
"name": "paa_not_ready"
},
{
"bytebit": "131.2",
"datatype": "Bool",
"name": "paa_unit_not_ready"
},
{
"bytebit": "131.3",
"datatype": "Bool",
"name": "paa_unit_alarm_present"
}
]
}
and my view js
function test() {
$('#example').DataTable({
serverSide : "true",
processing : "true",
info : true,
ajax : {
url : "/api/filling/all-fault",
type : "POST",
dataSrc : "obj",
columns : [
{render:"bytebit"},
{render:"datatype"},
{render:"name"}
]
}
});
}
i want show bytebit, datatype and name, but always got error Requested unknown parameter 0,
i have done reading datatable manual, online forum but still did not got answer,
please help, i got stuck, i don't know what wrong ?
tahnk you, i'm waiting for answer
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Replies
Hi @lestary ,
Change these:
to be
and that should do the trick. See example here.
Cheers,
Colin
@coling
thank you for reply.
i've change render to data, but, stil did not work, the error still same,
requested parameter unknown.
what should i do ?
i has spent 2 day for fix problem, but still got no answer
@colin
Updated
still got same error
my data come from python flask framework
please help me
You have
serverSide : "true",
. Do you need server side processing? Take a look at this FAQ to determine if you will need server side processing. If not you should remove that config option. Otherwise your server script will need to follow the protocol described here:https://datatables.net/manual/server-side
I suspect the Web Service you are using won't support this protocol and you will need to disable it. Try removing
serverSide : "true",
to see what happens. If that doesn't help then we will need to see a link to your page or a test case to diagnose the problem.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Or you could generate a debugger image for the developers to look out.
Kevin
thank you for reply
i set some basic configuration,
but i've done fix the problem,
the problem in json file i have "obj:" title, after i change the title to "data:" it's work
i dont know why but title should be "data:" canot used another text
if u know, can u explain why ??
I just noticed that
columns
initialisation is within theajax
- it isn't supposed to be. Could you your current client-side initialisation code so we can verify again, please.