Spread ASP.NET 16
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / FpSpread Class / GotoPage Method
Index of specified page
Example


In This Topic
    GotoPage Method
    In This Topic
    Scrolls through the sheet in the component to the specified page.
    Syntax
    'Declaration
     
    Public Sub GotoPage( _
       ByVal pageIndex As Integer _
    ) 
    'Usage
     
    Dim instance As FpSpread
    Dim pageIndex As Integer
     
    instance.GotoPage(pageIndex)
    public void GotoPage( 
       int pageIndex
    )

    Parameters

    pageIndex
    Index of specified page
    Remarks

    Use this method to scroll to a specific page of the active sheet using code.

    You can allow users to scroll to a specific page of the active sheet by using the Mode, Position, and Align properties to provide page navigation aids on the tool bars of the component.

    Example
    This example creates a spreadsheet with five columns and 150 rows, a PageSize of 30 rows and a PageCount of 3. The Pager is positioned on the top of the spreadsheet, and the user would be taken to the last page of the sheet.
    FpSpread1.Columns.Count=5;
    FpSpread1.Rows.Count=150;
    FpSpread1.ActiveSheetView.PageSize=30;
    FpSpread1.Pager.Position=FarPoint.Web.Spread.PagerPosition.Top;
    FpSpread1.Pager.PageCount=3;
    FpSpread1.GotoPage(4);
    FpSpread1.Columns.Count=5
    FpSpread1.Rows.Count=150
    FpSpread1.ActiveSheetView.PageSize=30
    FpSpread1.Pager.Position=FarPoint.Web.Spread.PagerPosition.Top
    FpSpread1.Pager.PageCount=3
    FpSpread1.GotoPage(4)
    See Also