laravel4-datatables-package
laravel4-datatables-package copied to clipboard
problem with view datatables (show as array not tables)?
I am new for this package.
I try test, and then it is show:
HTTP/1.0 200 OK Cache-Control: no-cache Content-Type: application/json Date: Thu, 20 Nov 2014 04:00:03 GMT {"sEcho":0,"iTotalRecords":28,"iTotalDisplayRecords":28,"aaData":[[1,"super","cpanel"],[2,"Admin","cpanel"],[3,"Test","sample"],[7,"Loan","loan"],[8,"asd","sample"],[9,"dsfasdf","sample"],[10,"fdg","loan"],[11,"dsfgdfsg","sample"],[12,"fdgsfg","loan"],[13,"fgfg","loan"],[14,"dfa","sample"],[15,"fdgfd","sample"],[16,"dffs","loan"],
This looks right, the purpose of this package is to work with http://datatables.net/ So you need to setup the front-end html, css and javascript to render
I added all of asset of datatables already, but don't show. Pleas example for me.
I have same problem. Please help us My script $("#user-list").dataTable({ "processing": true, "serverSide": true, "ajax": "demo.php", "order": [[1,'desc']], "columnDefs": [ { "targets": "_all", "defaultContent": "" } ], "columns": [ { "data" : "id", "title" : "Id", "orderable": true, "searchable": false }, { "data" : "username", "title" : "Username", "orderable": true, "searchable": true }, { "data" : "email", "title" : "Email", "orderable": true, "searchable": true }, ] });
I user datatables 1.10.4 don't show text, but i see row
My result ajax
{"sEcho":0,"iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[[1,"admin","[email protected]"]],"sColumns":["id","username","email"]}
I try use datatables 1.9.x but error I try edit output to {data:[[1,"admin",""[email protected]]]} But still error Sorry for my english
I fixed it. Change data to aaData
$("#user-list").dataTable({ "processing": true, "serverSide": true, "ajax": "demo.php", "order": [[1,'desc']], "columnDefs": [ { "targets": "_all", "defaultContent": "" } ], "columns": [ { "aaData" : "id", "title" : "Id", "orderable": true, "searchable": false }, { "aaData" : "username", "title" : "Username", "orderable": true, "searchable": true }, { "aaData" : "email", "title" : "Email", "orderable": true, "searchable": true }, ] });