Server side Pagination of 5 in 5

Server side Pagination of 5 in 5

isalazarcalleisalazarcalle Posts: 7Questions: 0Answers: 0

Hello,

I'm using the the pagingType = numbers.

Everything works correctly, but I would like that, when I select a number in the page, I will always be loaded the next 2 or 3 pages in the page and not one by one.
Is this possible?

Regards,

Replies

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    Maybe this example is what you are looking for:
    https://datatables.net/examples/server_side/pipeline.html

    Or maybe you want the Scroller extension.

    Kevin

  • isalazarcalleisalazarcalle Posts: 7Questions: 0Answers: 0

    No, I don't want to cache the results, but I want the pagination to show me more numbers than it shows me.

    Example: I return 154 rows and I have pageLength = 10.
    It shows: 1 of 16 (154 rows in total) 1 2 3 4 5 ...16

    If I select the number 5, the pagination shows:
    It shows: 1 of 16 (154 rows in total) 1 ...4 5 6...16

    Instead of 4 5 6, I want you to show, for example, 3 4 5 6 7.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @isalazarcalle ,

    That's not currently available, but you can create your own pagination plugin like these here.

    Cheers,

    Colin

  • isalazarcalleisalazarcalle Posts: 7Questions: 0Answers: 0

    Thanks for your reply @colin .

    I just found this option:
    $.fn.DataTable.ext.pager.numbers_length = 9

This discussion has been closed.