Class Pager

The Pager class provides a standalone pager that can be added on any page and doesn't require a DataSource or related control. The control can be manually assigned values to display or automatically infer values using one of the FilterXXX methods to filter a data source.

<>

System.Object
  System.Web.UI.Control
    Westwind.Web.Controls.Pager
public class Pager : Control

Class Members

MemberDescription

Constructor

FilterDataTable

Filters a data table for an ActivePage.

public DataTable FilterDataTable(DataTable dt,     int activePage)

FilterIEnumerable<T>

public IEnumerable FilterIEnumerable(IEnumerable items,     int activePage)

FilterIQueryable<T>

public IQueryable FilterIQueryable(IQueryable query,     int activePage)

public IQueryable FilterIQueryable(IQueryable query)

ActivePage

The page to display. Values are 1 based.

BaseUrl

The base Url for each of the paging links. If left blank the control will use the current page Url and append.

ContainerDivCssClass

The CSS Class used for the container div

CssClass

The CSS class used for the immediate pager control. By default this is rendered as a div tag. Default styling floats it right.

MaxPagesToDisplay

NextText

The text displayed for the next button. If empty this button isn't displayed.

PageLinkCssClass

CSS Class used for page links

PageSize

The number of items on the page

PagesText

Pages: text string

PagesTextCssClass

Pages: text

PreviousText

The text displayed for the previous button. If this text is empty the button is not displayed.

QueryStringPageField

Query string key name for the Page variable

RenderContainerDiv

Determines whether a container div tag is generated. Useful to allow nothing to be rendered if there are less than 2 pages as it hides the container. Alternately you can render the container through your markup but in that case you may end up with an empty container if there's no data or only a single page.

RenderContainerDivBreak

Determines whether a br clear='all' is rendered inside of the container div to break content.

SelectedPageCssClass

CSS class used for the selected page

ShowFirstAndLastPageLinks

Determines whether the 1... and ...n page links are shown before and after the displayed pages

ShowPreviousNextLinks

Determines whether the Previous and Next buttons are displayed

TotalItems

Total number of items available - must be set manually or via one of the filter methods

TotalPages

Total number of pages for this pager

Requirements

Namespace: Westwind.Web.Controls
Assembly: westwind.web.webforms.dll

See also:

Using the Pager Web Control to Page Content and Data Results

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic