Google like style pager for GridView

S

SMichal

Hi, I need a liitle help with build of my custom pager for gridview...I made
this kind of pager..I looks like this:
<< < 1 2 3 4 5 6 7 8 9 10 > >>

Well...it's no bad but I wannt something like google pager:
<< < 1 2 3 4... > >>

if user cliks on ... he should see this:
<< < ...5 6 7 8 ... > >>

etc.

Any idea how to solve this ?
 
R

Rob MacFadyen

Which google pager are you referring to? The one on the search page doesn't
look like that at all.


The search page one is:

[Previous] [BeforePages] CurrentPage [AfterPages] [Next]

[Previous] is only shown if CurrentPage > 1

[Next] is only shown if CurrentPage < TotalPages

[AfterPages] is limited to the next 9 pages, though
actually:
min(9, TotalPages - CurrentPage)

[BeforePages] is limited to the previous 10 pages,
though actually:
min(10, 10 - (10 - CurrentPage))


Does that make sense?

Regards,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top