System.Web.UI.WebControls Namespace PagerSettings Class
Sets or retrieves the number of link buttons to display in the pager when the Mode property is set to Numeric or NumericFirstLast.
Inline |
<pagersettings pagebuttoncount = intValue ... > |
Script |
GridView.PagerSettings.PageButtonCount = intValue |
intValue |
The number of link buttons to display concurrently in the pager element. |
The property is read/write with a default value of 10.
Use the PageButtonCount property to specify the number of numeric link buttons to display concurrently in the pager element of a control that supports pagination, such as the GridView, DetailsView, and FormView controls. The Mode property must be set to Numeric or NumericFirstLast for this property to have any effect.
If there are more pages in the grid than specified in this property, ellipses buttons ( ... ) are displayed in the pager element. When clicked, these buttons display the next or previous set of numeric buttons.
The following example demonstrates how to set the PageButtonCount property at design time, to display five numeric page buttons concurrently in the pager element of a paginated control.
<pagersettings ...
nextpagetext = "Next"
prevpagetext = "Back"
pagebuttoncount=5 />
PagerSettings Members