ServerDataPager V1.0 F1.7

File Name: Server_DataPager.asp
Class Name: ServerDataPager

Overview
Used to render a data-pager that can be used to navigate multiple data-pages in a data-bound control. The ServerDataGrid makes use of this control. This control can work stand-alone or can be used as part of other controls (see Server_DataGrid.asp for an example)



Public Constructors
New_ServerDataPager(name) This constructor is used to create an instance of the control while at the same time assiging it a name and id.
New ServerDataPager This is the default constructor and it will create an instance of the control without a name. Controls instanciated this way must assign the name of the control manually by doing this: <controlVariable>.Control.Name = "<ControlName>"

Public Properties
Control WebControl Inherits attributes from the WebControl class.
VirtualItemCount Int Sets/Gets the number of items that the pager needs to page. Since the pager doesn't care about the data itself, this can be any number.It is the developers work to keep this property on sync witht the real number of items being paged.
PageIndex Int Sets/Gets the current page index.
PageSize Int Sets/Gets the number of rows per page.
PagerSize Int Sets/Gets the number of pages to make quickly available when working on PagerType = 1
PagerType Int 0) Next/Prev  1) Show New/Prev AND <PagerSize> pages.
PrevText String Gets/Set the text to be displayed by the "Previous" link
NextText String Gets/Set the text to be displayed by the "Next" link
PrevNextCssClass String Gets/Set the CSS Class of the Previous and Next links.
PrevNextStyle String Gets/Set the Style of the Previous and Next links.
PagerStyle String Gets/Set the Pager style.
PagerCssClass String Gets/Set the Pager CSS Class Name
ShowProgress Boolean Not being used.
ProgressStyle String Gets/Set the "Records x out of n" style.
ProgressCssClass String Gets/Set the "Records x out of n" CSS Class.
CurrentPageStyle String Gets/Set the Style of the Current Page when using PagerType = 1
CurrentPageCssClass String Gets/Set the CSS Class of the Current Page when using PagerType = 1
PagerOwner WebControl Owner of the pager.This is used by other webcontrols that want to make use of the datapager as part of their implementation. See the ServerDataGrid for an example in how to implent this.

Public Methods
(default) Render Renders the control to the page.

Public Events
PageIndexChange Raised when the user nagivates to another page.
GotoPageIndex Raised when the user nagivates/jums to another page.

Protected Properties
-- -- --

Protected Methods
WriteProperties(bag) Invoked by the CLASP Framework to allow the control to restore its state after a postback. Bag is of type PropertyBag and can be used to read (or write) to the control viewstate.
ReadPropertied(bag) Invoked by the CLASP Framework to allow the control to persist its state before the page is destroyed. Bag is of type PropertyBag and can be used to read (or write) to the control viewstate.
RenderNextPrev Renders pager as Next/Prev.
RenderAsPager Renders pager as a mulltiple page navigation.
RenderAsSuperPager Not implemented.

Protected Events
HandleClientEvent Invoked by the CLASP Framework to allow the control to handle the postback event. From here the control can determine what is the course of action. If PageOwner is set, then it will delegate the event to the Owner of the control, otherwise it will handle it.