System.Web.UI.WebControls Namespace DataGrid Class
Retrieves the total number of pages required to display the items in the DataGrid control.
Script |
DataGrid.PageCount = intCount |
This property can only be used programmatically; it cannot be set when declaring the control.
intCount |
Integer specifying the total number of pages required to display the items in the DataGrid control. |
The property is read only with no default value.
Use this property to programmatically determine the number of pages required to display the items in the DataGrid control. This property is only used when the AllowPaging property is set to true.
The following example demonstrates how to use the PageCount property to determine the number of pages required to display the items in the DataGrid control.
PageCount is <%= myGrid.PageCount %>
Show me
DataGrid Members AllowPaging AllowCustomPaging PageSize PageIndexChanged