asp.net.ph

DataGridPageChangedEventArgs.NewPageIndex Property

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.

Syntax


Script [ int variable = ] DataGridPageChangedEventArgs.NewPageIndex

Property Value


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.

Remarks

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.

Example

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.

DataGrid AllowPaging Property
Run Sample | View Source
DataGrid PageSize, PageCount Properties
Run Sample | View Source
DataGrid SelectedIndex Property
Run Sample | View Source
See Also

DataGridPageChangedEventArgs Members   DataGrid Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph