Pagination issues

Pagination issues

aluferrarialuferrari Posts: 22Questions: 1Answers: 0

Hello,

We have a strange issue with pagination in data tables.

Some of our tables are showing following:

"Showing 1 to 050 of 200 records"

Notice "050" instead of "50". Whenever the table shows "XXX" format message, the "Next" button does not work.

All works fine when the message is shows:
""Showing 1 to 50 of 200 records"

Any idea why it is changing the format to "XXX" instead of "XX" ??

Thanks in advance.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Sounds like you are using a string somewhere where DataTables is expecting an integer. That might be the pageLength option or server-side processing return if you are using that.

    Allan

  • aluferrarialuferrari Posts: 22Questions: 1Answers: 0
    edited February 2016

    Thanks for quick reply, but we are not using that option.
    Here are the the related options that we use:

    "sPaginationType": "full_numbers",
    "iDisplayLength": "25",             ---------This could be the possible culprit ---------
    "bLengthChange": true,
    "oLanguage": {
    "sInfo": "Showing _START_ to _END_ of _TOTAL_ records" }
    

    Thanks.

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    "iDisplayLength": "25", ---------This could be the possible culprit ---------

    Yes. It should be an integer. Have you tried simply removing the quotes? That should resolve the issue.

    Note that iDisplayLength is the legacy form of pageLength.

    Allan

  • aluferrarialuferrari Posts: 22Questions: 1Answers: 0

    Bingo !!
    Making this integer solves the issue.

    Thank you very much..

This discussion has been closed.