Only the first column is rendered with server side processing
Only the first column is rendered with server side processing
Scapponian
Posts: 5Questions: 0Answers: 0
This is my first attempt at retrieving data with the datatables server side processing.
The problem is that it's only showing just the first column. And you can see by the json response that all the data (4 columns) is being passed correctly.
JSON:
{"sEcho": 1,"iTotalRecords": 101,"iTotalDisplayRecords": 101,"aaData": [["False","4-MOST * Denture Repair Kit - Liquid","Dental","HYGENIC"],["False","4-MOST * Denture Repair Kit - Powder","Dental","HYGENIC"],["False","ABC * DUAL CEMENT - Catalyst","Dental","IVOCLAR-VIVADENT"],["True","Abcocide 28","Dental","METREX RESEARCH"],["False","ABRASIVE WHEELS * Rubber Bonded","Dental","HALL"],["False","ABRASIVE WHEELS * Vitrified Red","Dental","SANDUSKY"],["False","ABSOLUTE * Accelerator","Dental","GC AMERICA"],["False","ABSOLUTE * Adhesive","Dental","GC AMERICA"],["False","ABSOLUTE * Base","Dental","GC AMERICA"],["False","ABSORBENT PAPER POINTS","Dental","GENERIC"]]}
[code]
$(function() {
$('#tblTest').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "query.aspx"
});
});
[/code]
[code]
[/code]
What am I missing here?
Thanks!
The problem is that it's only showing just the first column. And you can see by the json response that all the data (4 columns) is being passed correctly.
JSON:
{"sEcho": 1,"iTotalRecords": 101,"iTotalDisplayRecords": 101,"aaData": [["False","4-MOST * Denture Repair Kit - Liquid","Dental","HYGENIC"],["False","4-MOST * Denture Repair Kit - Powder","Dental","HYGENIC"],["False","ABC * DUAL CEMENT - Catalyst","Dental","IVOCLAR-VIVADENT"],["True","Abcocide 28","Dental","METREX RESEARCH"],["False","ABRASIVE WHEELS * Rubber Bonded","Dental","HALL"],["False","ABRASIVE WHEELS * Vitrified Red","Dental","SANDUSKY"],["False","ABSOLUTE * Accelerator","Dental","GC AMERICA"],["False","ABSOLUTE * Adhesive","Dental","GC AMERICA"],["False","ABSOLUTE * Base","Dental","GC AMERICA"],["False","ABSORBENT PAPER POINTS","Dental","GENERIC"]]}
[code]
$(function() {
$('#tblTest').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "query.aspx"
});
});
[/code]
[code]
[/code]
What am I missing here?
Thanks!
This discussion has been closed.
Replies
col1
col2
[code]
[/code]
please re-add the thead.
If I remove the or just leave it at one it'll show a single column.
[code]
1
2
3
4
[/code]
how is your server configured? it's saying it can't honor this URL request.
maybe switch to using POST? you'd have to override the fnServerData as per this link:
http://www.datatables.net/ref#fnServerData (the 2nd entry shows using POST)
http://physres.ipns.com/query.aspx?sEcho=1&iColumns=4&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&iSortingCols=1&iSortCol_0=1&sSortDir_0=asc&bSortable_0=false&bSortable_1=true&bSortable_2=true&bSortable_3=true&_=1320089259800
and even
http://physres.ipns.com/query.aspx
bSortable_1=true but iSortCol_0 & sSortDir_0 are being set.
Thank You for all the help!