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

iDisplaylength not limiting records.

$
0
0
I'm using version 1.9.0 datatables with verison 2.0.0 of Tabletools to do an ajax call to retrieve records from my database.

with iDisplaylength set to 25, it is still displaying the entire result set of 5000+ records.

Is there an issue using Datatables/TableTools with Ajax calls as it pertains to iDisplaylength?

oTable = $("#example").dataTable({
"sDom": \'T<"clear">lfrtip\',
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [ "select_all", "select_none" ]
},
"oLanguage": {
"sEmptyTable": "There are no records that meet the criterial"
},
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "/mypath/ajax/get_myrecords.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
/* Add some extra data to the sender */
aoData.push( { "name": "area", "value": "1234" } );
aoData.push( { "name": "emailtype", "value": $("#emailtype").val() } );
$.getJSON( sSource, aoData, function (json) {
/* Do whatever additional processing you want on the callback, then tell DataTables */
fnCallback(json)
} );
},
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"aaSorting": [[0, "desc"]],
"bStateSave": true
});

Thanks in advance!

Kevin

Viewing all articles
Browse latest Browse all 82027

Trending Articles



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