TPagedList implements a list with paging functionality.
TPagedList works in one of two modes, managed paging or customized paging,
specified by {@link setCustomPaging CustomPaging}.
- Managed paging ({@link setCustomPaging CustomPaging}=false) :
the list is assumed to contain all data and it will manage which page
of data are available to user.
- Customized paging ({@link setCustomPaging CustomPaging}=true) :
the list is assumed to contain only one page of data. An {@link onFetchData OnFetchData}
event will be raised if the list changes to a different page.
Developers can attach a handler to the event and supply the needed data.
The event handler can be written as follows,
Data in TPagedList can be accessed like an integer-indexed array and can
be traversed using foreach. For example,
The {@link setPageSize PageSize} property specifies the number of items in each page.
To access different page of data in the list, set {@link setCurrentPageIndex CurrentPageIndex}
or call {@link nextPage()}, {@link previousPage()}, or {@link gotoPage()}.
The total number of pages can be obtained by {@link getPageCount() PageCount}.
getCurrentPageIndex()
public method
getIsFirstPage()
public method
getIsLastPage()
public method
getPageCount()
public method
public getPageCount ( ) : integer |
return |
integer |
number of pages, -1 if under custom paging mode and {@link setVirtualCount VirtualCount} is not set. |
getPageSize()
public method
Changes to a page with the specified page index.
Switches to the next page.
onPageIndexChanged()
public method
This event is raised each time when the list changes to a different page.
previousPage()
public method
Switches to the previous page.
setCurrentPageIndex()
public method
setPageSize()
public method