pagination not working with datatable 1.10.7
pagination not working with datatable 1.10.7
hello,
i am using DataTable 1.10.7 with jQuery 2.1.4
This is my code of initialization:
var dt = $('#tbl-users').DataTable({
"processing": true,
"bServerSide": true,
"sAjaxSource": "ManageUsers",
"aoColumns": [
{
......................
...................
});
This is data returned by server side:
{"sEcho":1,"iTotalRecords":22,"iTotalDisplayRecords":10,"aaData":[{......}]}
It always shows "Showing 1 to 10 of 10 entries" and contain only one pagination button.
Please guide me to fix this problem.
This question has an accepted answers - jump to answer
Answers
iTotalRecords
andiTotalDisplayRecords
records should only be different if there is a filter applied to the table.As the legacy documentation notes (since you are using the legacy parameter sAjaxSource for whatever reason):
Allan
Thank you, it solved my problem