Is this the right way to setup columns with server side processing? jsfiddle included
Is this the right way to setup columns with server side processing? jsfiddle included
Is this the right way I should initialize columns with server side processing?
http://jsfiddle.net/peter/RwTq2/1/
[code]
$(document).ready(function() {
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://datatables.net/release-datatables/examples/server_side/scripts/jsonp.php",
"aoColumns": [
{"sWidth": "250px"},
{"sWidth": "200px"},
{"sWidth": "200px"},
{"sWidth": "200px"},
{"sWidth": "200px"}
],
"fnServerData": function(sUrl, aoData, fnCallback) {
$.ajax({
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "jsonp",
"cache": false
});
}
});
});
[/code]
http://jsfiddle.net/peter/RwTq2/1/
[code]
$(document).ready(function() {
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://datatables.net/release-datatables/examples/server_side/scripts/jsonp.php",
"aoColumns": [
{"sWidth": "250px"},
{"sWidth": "200px"},
{"sWidth": "200px"},
{"sWidth": "200px"},
{"sWidth": "200px"}
],
"fnServerData": function(sUrl, aoData, fnCallback) {
$.ajax({
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "jsonp",
"cache": false
});
}
});
});
[/code]
This discussion has been closed.
Replies
Allan