First row of data not showing using fnDataTablesPipeline
First row of data not showing using fnDataTablesPipeline
All my other tables are working fine. All of them I use a table with an empty body. When I call datatables() on the table id all of my others populate perfectly asking for 50 rows (5*10). This one datatable, for some reason, will not show the first row. Shows rows 2-n just fine. Data coming back looks like this:
aaData: [[3, GBP, 20], [4, CAD, 22]]
0: [3, GBP, 20]
1: [4, CAD, 22]
iTotalDisplayRecords: 2
iTotalRecords: 2
sEcho: 1
I've added this hack which fixes the issue:
if (iRequestStart == 0) {
iRequestStart = -1;
}
Here is the datatables def:
$('#pricing_currencies_datatable').dataTable( {
'sPaginationType': 'full_numbers',
'bJQueryUI': true,
'bProcessing': true,
'bServerSide': true,
'bFilter': false,
'sAjaxSource': 'datatable_redraws_new',
'fnServerData': fn_datatable_pipe,
'sScrollX': 'auto',
'bScrollCollapse': true,
'bAutoWidth': true,'aaSorting': [[ 1, 'asc' ]],
'aoColumns':[{ 'bVisible': false },null,null
]
});
$(window).bind('resize', function () {
var oTable = $('#pricing_currencies_datatable').dataTable();
oTable.fnAdjustColumnSizing();
} );
});
aaData: [[3, GBP, 20], [4, CAD, 22]]
0: [3, GBP, 20]
1: [4, CAD, 22]
iTotalDisplayRecords: 2
iTotalRecords: 2
sEcho: 1
I've added this hack which fixes the issue:
if (iRequestStart == 0) {
iRequestStart = -1;
}
Here is the datatables def:
$('#pricing_currencies_datatable').dataTable( {
'sPaginationType': 'full_numbers',
'bJQueryUI': true,
'bProcessing': true,
'bServerSide': true,
'bFilter': false,
'sAjaxSource': 'datatable_redraws_new',
'fnServerData': fn_datatable_pipe,
'sScrollX': 'auto',
'bScrollCollapse': true,
'bAutoWidth': true,'aaSorting': [[ 1, 'asc' ]],
'aoColumns':[{ 'bVisible': false },null,null
]
});
$(window).bind('resize', function () {
var oTable = $('#pricing_currencies_datatable').dataTable();
oTable.fnAdjustColumnSizing();
} );
});
This discussion has been closed.
Replies
Allan