TPager creates a pager that provides UI for end-users to interactively
specify which page of data to be rendered in a {@link TDataBoundControl}-derived control,
such as {@link TDataList}, {@link TRepeater}, {@link TCheckBoxList}, etc.
The target data-bound control is specified by {@link setControlToPaginate ControlToPaginate},
which must be the ID path of the target control reaching from the pager's
naming container. Note, the target control must have its {@link TDataBoundControl::setAllowPaging AllowPaging}
set to true.
TPager can display three different UIs, specified via {@link setMode Mode}:
- NextPrev: a next page and a previous page button are rendered.
- Numeric: a list of page index buttons are rendered.
- List: a dropdown list of page indices are rendered.
When the pager mode is either NextPrev or Numeric, the paging buttons may be displayed
in three types by setting {@link setButtonType ButtonType}:
- LinkButton: a hyperlink button
- PushButton: a normal button
- ImageButton: an image button (please set XXXPageImageUrl properties accordingly to specify the button images.)
Since Prado 3.2.1, you can use the {@link setButtonCssClass ButtonCssClass} property to specify a css class
that will be applied to each button created by the pager in NextPrev or Numeric mode.
TPager raises an {@link onPageIndexChanged OnPageIndexChanged} event when
the end-user interacts with it and specifies a new page (e.g. clicking
on a page button that leads to a new page.) The new page index may be obtained
from the event parameter's property {@link TPagerPageChangedEventParameter::getNewPageIndex NewPageIndex}.
Normally, in the event handler, one can set the {@link TDataBoundControl::getCurrentPageIndex CurrentPageIndex}
to this new page index so that the new page of data is rendered.
Multiple pagers can be associated with the same data-bound control.
getCurrentPageIndex()
публичный Метод
getFirstPageImageUrl()
публичный Метод
public getFirstPageImageUrl ( ) : string |
Результат |
string |
the image URL for the first page button. This is only used when {@link getButtonType ButtonType} is 'ImageButton'. |
getFirstPageText()
публичный Метод
getIsFirstPage()
публичный Метод
getIsLastPage()
публичный Метод
getLastPageImageUrl()
публичный Метод
public getLastPageImageUrl ( ) : string |
Результат |
string |
the image URL for the last page button. This is only used when {@link getButtonType ButtonType} is 'ImageButton'. |
getLastPageText()
публичный Метод
getNextPageImageUrl()
публичный Метод
public getNextPageImageUrl ( ) : string |
Результат |
string |
the image URL for the next page button. This is only used when {@link getButtonType ButtonType} is 'ImageButton'. |
getNextPageText()
публичный Метод
getNumericPageImageUrl()
публичный Метод
public getNumericPageImageUrl ( ) : string |
Результат |
string |
the image URL for the numeric page buttons. This is only used when {@link getButtonType ButtonType} is 'ImageButton' and {@link getMode Mode} is 'Numeric'. |
getPageCount()
публичный Метод
getPageImageUrl()
защищенный Метод
getPrevPageImageUrl()
публичный Метод
public getPrevPageImageUrl ( ) : string |
Результат |
string |
the image URL for the previous page button. This is only used when {@link getButtonType ButtonType} is 'ImageButton'. |
getPrevPageText()
публичный Метод
onPageIndexChanged()
публичный Метод
This event is raised when page index is changed due to a page button click.
setCurrentPageIndex()
защищенный Метод
setFirstPageImageUrl()
публичный Метод
setFirstPageText()
публичный Метод
setLastPageImageUrl()
публичный Метод
setLastPageText()
публичный Метод
setNextPageImageUrl()
публичный Метод
setNextPageText()
публичный Метод
setNumericPageImageUrl()
публичный Метод
This is actually a template for generating a set of URLs corresponding to numeric button 1, 2, 3, .., etc.
Use {0} as the placeholder for the numbers.
For example, the image URL http://example.com/images/button{0}.gif
will be replaced as http://example.com/images/button1.gif, http://example.com/images/button2.gif, etc.
setPageCount()
защищенный Метод
setPrevPageImageUrl()
публичный Метод
setPrevPageText()
публичный Метод