Click here to Skip to main content
12,826,806 members (38,145 online)
Click here to Skip to main content
Add your own
alternative version


15 bookmarked
Posted 15 Feb 2004

Google-like PageLister control which helps to organize paging representation of your data.

, 15 Feb 2004
Rate this:
Please Sign up or sign in to vote.
Google-like PageLister control which helps to organize paging representation of your data.

Sample Image - demo.gif


Some time ago, while I was working on one of my projects, I needed a control for paging representation of some data. When I'm talking about "paging representation", I mean representation in portions, page by page. Probably, the best example of it you can find on virtually any search machine like google, altavista etc.

What I needed is a line of clickable links representing pages filled with some information with current page highlighted. When a link is clicked, an event must be fired to allow the application to change the page.

First, I tried to find such a control somewhere in the net but my brief search wasn't successful. The requirements for the control were pretty simple so I decided that I would spend less time writing it than looking for it.

As I said, the control is pretty simple and, I hope, well commented. You surely don't need to be a genius to write something like this yourself. Here I skip most of the realization details and describe the control's interface.

Control's interface

What this control has is only three properties and one event.

The properties are:

  • uint PagesCount {get; set;} - gets or sets the total number of pages the control must present.
  • uint CurrentPage {get; set;} - gets or sets 1-based number of the current page.
  • uint NumPagesShown {get; set;} - gets or sets the number of links that can be shown on each side of the current page's link. Normally, you see current link in the centre of the links line and equal number of links (NumPagesShown) on each side. Of course, when current page is close to the beginning or to the end of line it moves from the central position. So, the maximal total number of links shown is 2*NumPagesShown + 1 or PagesCount, whatever is less.

The event PageChanged is fired when the current page is changed. The only event handler's parameter, currentPage is the new current page's number which you can also receive using CurrentPage property.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Artem Kliatchkine
Web Developer
Belgium Belgium
No Biography provided

You may also be interested in...


Comments and Discussions

Generalsimple & artistically Pin
Norton19-Feb-04 16:52
memberNorton19-Feb-04 16:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170326.1 | Last Updated 16 Feb 2004
Article Copyright 2004 by Artem Kliatchkine
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid