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

anaganag Posts: 48Questions: 2Answers: 7
edited October 2011 in General
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]

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Looks just about perfect to me :-).

    Allan
This discussion has been closed.