iDisplayLength always -1

iDisplayLength always -1

AslanAslan Posts: 2Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
I have a data table using Scroller with server-side processing and the following init:
[code]
oTable= jQuery('#request-grid').dataTable({
"bProcessing": true,
"bServerSide": true,
"bPaginate": false,
"bFilter": false,
"bScrollCollapse": false,
"sScrollY": "100px",
"bDeferRender": true,
"sScrollX": "100%",
"sAjaxSource": '/ajax/requests-db.php',
"sDom":'<"grid-top"lfrip<"clear">>tS<"grid-bottom">',
"oScroller": {
"loadingIndicator": true,
"trace": true
},
"fnRowCallback": function ( nRow, aData, iDisplayIndex ) {
row_css = status_to_class (parseInt(aData[7]));
if (row_css !== false ) jQuery(nRow).addClass(row_css);
},
"fnInitComplete" : function(oSettings, json) {
adjust_table_height();
console.log("oTable initialized " + oTable.fnSettings().oScroll.sY);
},
"fnCreatedRow": function( nRow, aData, iDataIndex ) {
jQuery(nRow).children("td").wrapInner("")
}

});
[/code]
I have a strange problem: in the ajax query to the server iDisplayLength value always -1
sEcho:15
iColumns:7
sColumns:
iDisplayStart:0
iDisplayLength:-1
mDataProp_0:0
mDataProp_1:1
mDataProp_2:2
mDataProp_3:3
mDataProp_4:4
mDataProp_5:5
mDataProp_6:6
iSortCol_0:0
sSortDir_0:asc
iSortingCols:1
bSortable_0:true
bSortable_1:true
bSortable_2:true
bSortable_3:true
bSortable_4:true
bSortable_5:true
bSortable_6:true

and my servers-side processing script return all records. This causes a problem when a large number of rows in the table.
Also, during scrolling, the table not make ajax query for additional data-loading like this scroller example: http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html
Who can help solve it?
my table debug data http://debug.datatables.net/exuxon

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    > "bPaginate": false,

    This cannot be set with Scroller since Scroller uses the pagination abilities of DataTables to do what it does.

    Allan
  • AslanAslan Posts: 2Questions: 0Answers: 0
    edited March 2013
    Yes, indeed, I have compared the settings from your example and also saw it.
    In addition, it was small bug in the server-side script and as a result the value of iTotalDisplayRecords was wrong. It prevented the triggering of new events for loading of data.
    Thank you very much for your help! Your idea of ​​collecting debugging information - beautiful!
This discussion has been closed.