Spread for ASP.NET 10 Product Documentation > Developer's Guide > Customizing the Appearance > Customizing the Appearance of the Sheet > Customizing the Page Size (Rows to Display) |
In this Web Form version of Spread, a page is the amount of data of a sheet that can be displayed at one time. When the sheet contains more rows than can be displayed in the component, Spread automatically creates pages that contain the other rows. (These are not to be confused with HTML pages.) For sheets that have more rows than fit in the display area, the sheet has multiple pages.
The page size is the number or rows that are displayed at one time. By default, the page size is ten, so ten rows are displayed. If you would like to display more than ten rows (or ten records for a bound spreadsheet), set the PageSize property to the number of records you want to display on every page.
For more information on setting the page navigation, refer to Customizing Page Navigation.
Set the PageSize property for the sheet using the ActiveSheetView shortcut of the FpSpread component.
The following code shows how to set the page size to display 15 rows.
C# |
Copy Code
|
---|---|
FpSpread1.ActiveSheetView.PageSize = 15; |
VB |
Copy Code
|
---|---|
FpSpread1.ActiveSheetView.PageSize = 15 |
Set the PageSize property for the SheetView class.
The following code shows how to set the page size to display 15 rows.
C# |
Copy Code
|
---|---|
FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView; sv.PageSize = 15; |
VB |
Copy Code
|
---|---|
Dim sv As FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView sv.PageSize = 15 |