Ajax pagination - Having 1 page although iTotalDisplayRecords and iTotalRecords are set to 57

Ajax pagination - Having 1 page although iTotalDisplayRecords and iTotalRecords are set to 57

coscurtcoscurt Posts: 2Questions: 0Answers: 0
edited September 2013 in General
Hi,

Im trying to get datatable working with a server side response and have pagination working.
The problem is that although im setting iTotalRecords and iTotalDisplayRecords, it still shows only 1 page, or the total number of items (eg. if server returns 20, than shows 2 pages, but not all the pages based on the total records).

I have created this jsfiddle, where im manually setting the server response data in the fnServerData function.

http://jsfiddle.net/Na9aW/3/

Even if i define 10 records in aaData, it still shows only 1 page.
Because iTotalRecords is set to 57 i would have expected it to show the 6 pages and "1 to 2 of 57 entries".

Is there anything im missing?

Thanks for the help.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Typo:

    > bServerSIde: true,

    Should be:

    > bServerSide: true,

    :-)

    Allan
  • coscurtcoscurt Posts: 2Questions: 0Answers: 0
    You'r a lifesaver :)
    Thanks!
This discussion has been closed.