i have a problem with jquery datatable pagination (Server side processing).
For example i have a 24
records in database. The count is displaying correctly and total pagination also displaying correctly.
when i click on Next or 2nd page
it displays records as per the display page length.
Here 3rd Page
last 4 records are not displayed.
Here my server side code is like this
$this->db->select("SQL_CALC_FOUND_ROWS user_id,user_name,email", FALSE);
$this->db->from("users");
$sTable="users";
// Data set length after filtering
$this->db->select('FOUND_ROWS() AS found_rows');
$iFilteredTotal = $this->db->get('users')->row()->found_rows;
// Total data set length
$iTotal = $this->db->count_all($sTable);
// Output
$output = array(
'sEcho' => intval($sEcho),
'iTotalRecords' => $iTotal,
'iTotalDisplayRecords' => $iFilteredTotal,
'aaData' => array()
);
Client side Code like this
$(document).ready(function () {
$('#data_appraiser').dataTable({
"bProcessing": true,
"bServerSide": true,
"oLanguage": {
"sProcessing": imgsrc,
},
//"aaData": data.aaData,
"iDisplayLength": 10,
"aLengthMenu": [
[10, 25, 50],
[10, 25, 50] // change per page values here
],
"aaSorting": [[0, 'asc']],
"sServerMethod": "POST",
"sAjaxSource": "appraiserlistajaxdata",
"sPaginationType": "full_numbers"
"aoColumns": [
{ "mData": "id" },
{ "mData": "appraiser_name" },
{ "mData": "user_name" }
....
]
});
});
I checked with $iFilteredTotal
total count.when the page changes the value is 20
.If it is in 1st page
the value is 24
.i am unable to solve this problem. Sorry if my problem was weired.Could any one help me how to resolve this issue. Thanks
client side
code.Please look at once. – Krishna38