System.Web.UI.WebControls.GridView.PageCount Property

Gets the number of pages required to display the records of the data source in a System.Web.UI.WebControls.GridView control.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public virtual int PageCount { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the paging feature is enabled (by setting the GridView.AllowPaging property to true), use the GridView.PageCount property to determine the total number of pages required to display the records in the data source. This value is calculated by dividing the total number of records in the data source by the number of records displayed in a page (as specified by the GridView.PageSize property) and rounding up.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0