Customizing the "Pagination"

Customizing the "Pagination"

gsgill76gsgill76 Posts: 4Questions: 0Answers: 0
edited August 2011 in General
Hi I am using DataTables 1.8 & is awesome. I love it.
I am using DataTables with ASP.NET 2010, Framework 4.0

I need to customize the Paging, i dont want [quote] Last First 1 2 3 4 5 Next Last [/quote]

I need it as [quote] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _ >> [/quote] if i click on the [quote] _ [/quote] page button the paging list should be [quote] _ 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 _>>[/quote] and so on like this.

Please help me....

Thanks
Gurpreet Gill

Replies

  • gsgill76gsgill76 Posts: 4Questions: 0Answers: 0
    Any one can help me ...
  • StephanStephan Posts: 20Questions: 0Answers: 0
    I only got a dirty approach for you. Hide default pagination via javascript & css. Create your own pagination "links" und display them where you want. All you need is iDisplaylength and iTotalrecords and some simple logic wheter to call fnRedraw and push the requested PageNumber via fnServerData or to just render the next pagination_tab.
    The cleaner way would be an pagination plugin that handles your needs. If you look at the sourcecode and search for "full_numbers" you wil get some hints.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    As Stephan notes this can be done with a custom pagination plug-in. There is documentation and a few examples here:

    http://datatables.net/development/pagination
    http://datatables.net/plug-ins/pagination

    Allan
  • gsgill76gsgill76 Posts: 4Questions: 0Answers: 0
    Allan thanks for the reply, let me make a try of it... will let you know about the success :)
    Thanks
This discussion has been closed.