System.Web.UI.WebControls Namespace DataGridPagerStyle Class
Sets or retrieves the vertical position of the pager element in a DataGrid control.
Inline |
<pagerstyle position = enumValue ... > |
Script |
DataGrid.PagerStyle.Position = enumValue |
The property is read/write with a default value of Bottom.
Use the Position property to specify the location where the pager element is displayed in a DataGrid control. The pager element can be displayed at the upper edge, the lower edge, or at both the upper and lower edges of the grid.
The following example demonstrates how to programmatically set the PagerStyle.Position property at run time. This simple script dynamically changes the display position of the pager based on the state of a CheckBox named chkTop.
if ( chkTop.Checked )
myGrid.PagerStyle.Position = PagerPosition.Top;
else
myGrid.PagerStyle.Position = PagerPosition.Bottom;
Show me
DataGridPagerStyle Members PagerPosition Enum Mode Visible