json data - aaData example does not work?
json data - aaData example does not work?
riix
Posts: 13Questions: 7Answers: 0
help. been at it for 3 days. no hair left to rip out. Issue is:
a. have a datatable
b. would like to load it from json data
c. would like to dynamically reload it when the json data source gets changed.
d. nothing works, finally devolved to the point of trying just the very simple example for "aaData" (putting this in the document ready function):
$('#ResGrid').dataTable({
"aaData": [{ "facNam": "aaa" }, { "facNam": "bbb"}]
,
"aoColumns": [
{ "sTitle": "Facility", "mData": "facNam" }
]
});
where further down below on the page is:
facNam
e. this results in dreaded "requested unknown parameter '0' from the data source for row 0"
f. can anyone explain what I am doing wrong?
g. if we ever get this running, any suggestions on how to clear and rebind to a json object?
thx in advance.
a. have a datatable
b. would like to load it from json data
c. would like to dynamically reload it when the json data source gets changed.
d. nothing works, finally devolved to the point of trying just the very simple example for "aaData" (putting this in the document ready function):
$('#ResGrid').dataTable({
"aaData": [{ "facNam": "aaa" }, { "facNam": "bbb"}]
,
"aoColumns": [
{ "sTitle": "Facility", "mData": "facNam" }
]
});
where further down below on the page is:
facNam
e. this results in dreaded "requested unknown parameter '0' from the data source for row 0"
f. can anyone explain what I am doing wrong?
g. if we ever get this running, any suggestions on how to clear and rebind to a json object?
thx in advance.
This discussion has been closed.
Replies
@riix - Please link us to a test page showing the error if BLSully's suggestion doesn't help.
Allan