iDisplayLength not honored

iDisplayLength not honored

jeremibjeremib Posts: 1Questions: 0Answers: 0
edited November 2012 in General
So I have iDisplayLength set to 25, but it still only requests 10 records from my server. Here's my setup:

[code]
$('#data_grid_tbl').dataTable( {
"aoColumns": [
{ "mData" : "index", "sTitle": "#", "bSortable": false },
{ "mData" : "visits", "sTitle": "visits", "bSortable": false },
{ "mData" : "pages", "sTitle": "pages", "bSortable": false },
{ "mData" : "bounces", "sTitle": "bounces", "bSortable": false },
{ "mData" : "avg_time", "sTitle": "avg time", "bSortable": false },
{ "mData" : "keyword_phrase", "sTitle": "keyword phrase", "bSortable": false },
],
"bStateSave" : true,
"bAutoWidth" : false,
"bProcessing" : true,
"bDeferRender" : true,
"bServerSide" : true,
"sAjaxSource" : sAjaxSource,
"bJQueryUI": true,
"bScrollInfinite": true,
"bScrollCollapse": false,
"bSortClasses" : true,
"bFilter": false,
"iDisplayLength": 25,
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"sScrollY": ($(window).height() - 315),
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"sSwfPath": "/bundles/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "copy",
"sButtonText": "copy",
"sToolTip": "copy to clipboard"
},
{
"sExtends": "xls",
"sButtonText": "export",
"sToolTip": "export to excel"
},
{
"sExtends": "pdf",
"sButtonText": "pdf",
"sToolTip": "create pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Website Keyword Phrase Report"
}
]
}
} );
[/code]

As I said, It's not server-side, it's that the ajax call is only requesting 10.

http://domain.tld/myscript.php?site=4&period=range&date_start=09/01/2012&date_end=10/31/2012&segment=&sEcho=1&iColumns=6&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=index&mDataProp_1=visits&mDataProp_2=pages&mDataProp_3=bounces&mDataProp_4=avg_time&mDataProp_5=keyword_phrase&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&bSortable_0=false&bSortable_1=false&bSortable_2=false&bSortable_3=false&bSortable_4=false&bSortable_5=false&_=1354226503545

Thanks

Replies

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin
    Please provide a link to a page showing the issue ( http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read ). I don't see anything wrong with the code above - it should work, although it apparently isn't, So a test case is needed to debug it.

    Allan
This discussion has been closed.