System.Web.UI.WebControls Namespace DataGridPageChangedEventArgs Class
Returns the index of the page selected by the user in the page selection element of a DataGrid.
Script |
[ int variable = ] DataGridPageChangedEventArgs.NewPageIndex |
variable |
Integer specifying the index of the selected page in the pager element of a DataGrid. |
The property is read only with no default value.
Use the NewPageIndex property to determine the index of the page selected by the user in the page selection element of the DataGrid control. This value is often used to set the CurrentPageIndex property of the grid to display the selected page.
The following examples demonstrate how to use the NewPageIndex property to determine the index of the page selected by the user, the value of which is then used to set the CurrentPageIndex property of the DataGrid to display the selected page.
DataGridPageChangedEventArgs Members DataGrid Class