Pagination and ajax function

Pagination and ajax function

seltrisseltris Posts: 5Questions: 2Answers: 0

Hi, I have a quick question about the pagination behaviour.

Fiddler sample: https://jsfiddle.net/nm1fv2nr/8/

As you can see in the provided fiddler sample, the pager still shows 1 page even if the returned object has both properties
"recordsTotal" and "recordsFiltered" set to 20000.

What am I doing wrong?
How do I manage the result data in order to get the pager work correctly?

Thanks in advance for your help.
Best Regards
Giovanni

This question has an accepted answers - jump to answer

Answers

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

    Two issues:

    1. The serverSide option wasn't set, so the server-side processing parameters being returned were ignored.
    2. The draw value being returned was incorrect - its just a counter. See the docs here.

    Updated example: https://jsfiddle.net/nm1fv2nr/9/

    Allan

  • seltrisseltris Posts: 5Questions: 2Answers: 0

    Thanks for your tips.
    Now it works correctly.

This discussion has been closed.