System.Web.UI.WebControls Namespace DataGridPagerStyle Class
Sets or retrieves the number of link buttons to display in the pager element of a DataGrid control.
Inline |
<pagerstyle pagebuttoncount = intValue ... > |
Script |
DataGrid.PagerStyle.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 DataGrid control. The Mode property must be set to PagerMode.NumericPages 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 DataGrid.
<pagerstyle ...
nextpagetext = "Next"
prevpagetext = "Back"
pagebuttoncount=5 />
DataGridPagerStyle Members DataGrid Class