Server side processing doesnt work
Server side processing doesnt work
Newinthezone
Posts: 22Questions: 0Answers: 0
Hi I have been trying to get server side processing to work for a couple of weeks now but theres no breakthrough yet.
All the rows from the table appear together on the page, no css and borders and no search query works.
>"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
I am simply using a SQL data source which is being bound to a gridview.
[code]
$(document).ready(function () {
var oTable = $('#GridView1').GridviewFix({ header: "headerStyle", row: "rowStyle", footer: "footerStyle" }).dataTable({
"bServerSide": true,
"sAjaxSource": "WebForm4.aspx",
"sPaginationType": "full_numbers",
"oLanguage": {
"sSearch": "Search all columns:"
}});
[/code]
I am using firebug to see my JSON Data but there is no JSON data being detected either by firebug or fiddler.
Do I have to convert the sql data to JSON format or something?
This is my debug link for datatables.
http://debug.datatables.net/anaret
If you see under the json , it just returns the HTML and scripts.
Please help .
All the rows from the table appear together on the page, no css and borders and no search query works.
>"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
I am simply using a SQL data source which is being bound to a gridview.
[code]
$(document).ready(function () {
var oTable = $('#GridView1').GridviewFix({ header: "headerStyle", row: "rowStyle", footer: "footerStyle" }).dataTable({
"bServerSide": true,
"sAjaxSource": "WebForm4.aspx",
"sPaginationType": "full_numbers",
"oLanguage": {
"sSearch": "Search all columns:"
}});
[/code]
I am using firebug to see my JSON Data but there is no JSON data being detected either by firebug or fiddler.
Do I have to convert the sql data to JSON format or something?
This is my debug link for datatables.
http://debug.datatables.net/anaret
If you see under the json , it just returns the HTML and scripts.
Please help .
This discussion has been closed.
Replies
> Do I have to convert the sql data to JSON format or something?
Yes - DataTables is expecting a certain format - you need to return your data in that format, otherwise DataTables doesn't have a chance :-)
Allan
Allan