System.Web.UI.WebControls Namespace
Specifies the behavior mode of the pager in a DataGrid control.
Member Name |
Description |
NextPrev |
Renders a pager element that uses Next and Previous buttons. |
NumericPages |
Renders a pager element that uses numeric buttons. |
The PagerMode enumeration represents the different display values that can be passed to the Mode property of a DataGridPagerStyle object.
The following example demonstrates how to programmatically set the DataGridPagerStyle.Mode property at run time. This simple script dynamically changes the display mode of the pager based on the state of a CheckBox named chkNumbers.
if ( chkNumbers.Checked )
myGrid.PagerSettings.Mode = PagerMode.NumericPages;
else
myGrid.PagerSettings.Mode = PagerMode.NextPrev;
Show me
PagerPosition DataGridPagerStyle