Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82226

FixedColumns performs four identical server requests on creation

$
0
0
Using a serverside table with two fixed columns, the table performs four identical requests to the server before rendering the first page of the table. See here the network protocol:

https://docs.google.com/file/d/0B-C44vw27ypxS1kwQ1RlVnFpWk0/edit?usp=sharing

And here is my jsfiddle to reproduce it:

http://jsfiddle.net/rplantiko/yKYCA/show/

This is the code for initialization. The first request is the "normal" one, from the datatable initialization. The successive three requests stem from the initialization code of FixedColumns:

var oTable = $('#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"}
],
"sScrollX":"100%",
"sScrollXInner":"110%",
"bScrollCollapse": true,
"fnServerData": function(sUrl, aoData, fnCallback) {
$.ajax({
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "jsonp",
"cache": false
});
}
});

new FixedColumns( oTable, { iLeftColumns: 2 } );

The formula for the total number of identical requests is:

#identicalrequests = 2 + iLeftColumns

Kind regards,
Rüdiger

Viewing all articles
Browse latest Browse all 82226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>