Server-side pagination is not working

Server-side pagination is not working

tampe125tampe125 Posts: 7Questions: 1Answers: 0
edited September 2011 in General
hi, i'm using datatables loading data with an ajax call.
the result is ok, i can filter, paginate, etc etc but paginate links are not updated.
i mean:
i display 10 rows, my entire set is made by 100 rows so i would expect 10 pages, instead i have only 1 page!

any help?

this is my code:
[code]
var dataTable = $('#dataTable').dataTable({
"bStateSave": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": RAW_URL + "&task=getTowns",
"oLanguage": {
"sUrl" : "administrator/components/com_jdomus/library/dataTables/language/it-IT.txt"
}
});
[/code]

Replies

  • tampe125tampe125 Posts: 7Questions: 1Answers: 0
    i've made some tests, but it didn't help ;/

    everything seems ok, since this is my footer table:

    [code]
    Showing 1 to 10 of 10 entries (filtered from 8,049 total entries)
    [/code]

    but i can't surf between pages :(
  • allanallan Posts: 63,530Questions: 1Answers: 10,473 Site admin
    I would say with some degree of certainty that the value you are returning for iDisplayRecords is "10" rather than what it should be :-). iDisplayRecords should be the total number of records in the result set, regardless of paging, but inclusive of filtering. iDisplayTotalRecords should be the total number of records in the result set regardless of paging and filtering. So they should be the same unless you have a filter applied.

    More details about the expected return format here: http://datatables.net/usage/server-side

    Allan
  • tampe125tampe125 Posts: 7Questions: 1Answers: 0
    thanks a lot!
    so i should be a count query with the same where..

    thanks i'll try it asap
This discussion has been closed.