Ajax and Child rows (show extra / detailed information)
Ajax and Child rows (show extra / detailed information)
mameun
Posts: 3Questions: 1Answers: 0
hi,
I try to do : https://datatables.net/examples/api/row_details.html, with a source in a php file via ajax.
my php file : connect to bdd -> echo json_encode($tab)
my file with the table is like the example of the link above. the only different is :
...
"ajax": {
"url":"bdd.php",
"type":"POST"
},
"columns": [
...
the table is : LOADING ... and I've no results.
I need your help ;O))
Thanks a lot,
Mike
This discussion has been closed.
Answers
Hi,
I've better results with a change in my php file for the json.
now my datatable is show without data. a message : DataTables warning: table id=table_id - Requested unknown parameter 'site' for row 0. For more information about this error, please see http://datatables.net/tn/4, appear
but I don't know how do well
all my data in the source are full....
The diagnostic help you need is on that page.
I've all ready read this page what I've cited.
my english is very bad, but after re-read this page, I don't yet know how to do well
my data :
data:[{"id":"1","code":"004","projet":"infor","site":"un site","nom":"Name","actif":"NA",.....
my script:
"processing": true,
"serverSide": true,
"ajax": {
"url":"bdd.php",
"dataType": "json",
"type":"POST"
},
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": null
},
{ "data": "site" },
{ "data": "projet" },
{ "data": "code" },
{ "data": "nom" }
],
"order": [[1, 'asc']]
and the warning :
table id=table_id - Requested unknown parameter 'site' for row 0