I am trying to work with pagination jquery data. I am loading data using ajax. Now my answer is:
aaData: [[:anonymous:, null, 2012-07-29 08:28:21, 0, 85 million, null],…]
iTotalDisplayRecords: 70
iTotalRecords: 70
sEcho: 1
All my records (70) are shown, how can I make them paginated and have 10 records per page?
I tried setting iTotalDisplayRecords to 10, but it shows the same result.
My datatable init:
myDataTable = $('#datatablesresults').dataTable({
bProcessing : true,
sProcessing : true,
bServerSide : true,
sAjaxSource : '/results/load-results?' + getParams,
aoColumnDefs : [{'bSortable' : false, 'aTargets' : ['no-sort']}],
sPaginationType : 'full_numbers',
fnDrawCallback : function(oSettings) {
_initTable();
}
});
source
share