This documentation is archived and is not being maintained.
DataGrid.PageSize Property
.NET Framework 1.1
Gets or sets the number of items to display on a single page of the DataGrid control.
[Visual Basic] Public Overridable Property PageSize As Integer [C#] public virtual int PageSize {get; set;} [C++] public: __property virtual int get_PageSize(); public: __property virtual void set_PageSize(int); [JScript] public function get PageSize() : int; public function set PageSize(int);
Property Value
The number of items to display on a single page of the DataGrid control. The default value is 10.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The specified page size less than 1. |
Remarks
Use this property to specify the number of items to display on a single page of the DataGrid control. The AllowPaging property must be set to true for this property have any effect.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
DataGrid Class | DataGrid Members | System.Web.UI.WebControls Namespace | AllowPaging | AllowCustomPaging | PageIndexChanged
Show: