Pagination: Full numbers with display of total number of pages

Pagination: Full numbers with display of total number of pages

PMartinsPMartins Posts: 4Questions: 0Answers: 0
edited April 2011 in General
Hello,

Once again, thank you so much for the excelent product that datatables is. The more I use it, the happier I get.
Right now, I'm trying to change the full_numbers display mode in such a way that it displays the total number of pages, somehow. Something like "First Prev 1 2 3 4 5 ... 1555 Next Last". Adding the "... 1555" part to the current pagination is the issue.
Any tips on how can I proceed with this?

Regards,
Pedro Martins

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Hi Pedro,

    Have a look at this plug-in: http://datatables.net/plug-ins/pagination#extStyle . I think it does basically what you are looking for.

    Regards,
    Allan
  • PMartinsPMartins Posts: 4Questions: 0Answers: 0
    Hello Allan,

    It almost did the trick for me. A problem we had (using server-side sorting) is that the it rendered the total number of pages before the query was executed. I modified your full_numbers into an extra pagination option which covers my needs.

    When it gets properly tested, we'll send it to you, in case somebody else finds this useful.

    Thank you so much, regards,
    Pedro Martins
This discussion has been closed.