Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35317

Custom pagination Ex.(First,Previous,[1],2,3,4,5,6,7,8,9,10,Next,Last)

$
0
0

Hi, Unfortunately, after browsing through the documentation, I did not see anything regarding to customizing the number of pages displayed in the pagination.

By default, datatables' pagination is hard to use when there are 1000+ pages (10 rows per page/not negotiable :P ) as going from page 1 to page 500 will take you 499 clicks in the [Next] button.

In initial load the pagination would be displayed as (First,Previous,[1],2,3,4,5,...1000,Next,Last)

If were to go to page 500, I would click page [5], and the result would be: (First,Previous,1..4,[5],6...1000,Next,Last)

And from here it will be a painfully repeating of clicking the Next button until page 500.

So my question would be, it possible to behave like this? (First,Previous,[1],2,3,4,5,6,7,8,9,10,Next,Last) then clicking page 7 will result to this: (First,Previous,3,4,5,6,[7],8,9,10,11,Next,Last)

Or better yet: (First, Previous 10 ,[1],2,3,4,5,6,7,8,9,10, Next 10 ,Last) Click Next 10 will be: (First, Previous 10 ,[11],12,13,14,15,16,17,18,19,20, Next 10 ,Last)

Hopefully there is a solution that pure uses paging numbers (no dropdowns to select page number/no textbox to manually input desired page). As we are using datatables to replace the asp:datagrid(See http://www.4guysfromrolla.com/demos/dgExample33.aspx to check how asp:datagrid pagination works.


Viewing all articles
Browse latest Browse all 35317

Trending Articles