ASPxClientWebDocumentViewer.GetCurrentPageIndex() Method

Returns the current page's zero-based index.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll


public int GetCurrentPageIndex()
Public Function GetCurrentPageIndex As Integer


Type Description

A zero-based integer value that specifies the index of a current page.

The code snippet below demonstrates how to use the ASPxClientWebDocumentViewer.DocumentReady event to navigate through pages of a ready document. To obtain the current page number and navigate to the next page, use the GetCurrentPageIndex and ASPxClientWebDocumentViewer.GoToPage methods.

<script type="text/javascript" id="script">
    function documentReady(s, e) {
        var goToNextPage = function () {
            var pageIndex = s.GetCurrentPageIndex();
            if (e.PageCount <= pageIndex)
            s.GoToPage(pageIndex + 1);
            setTimeout(function () { goToNextPage(); }, 3000);

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server" ReportSourceId="WebReportDesigner.XtraReport1">
     <ClientSideEvents DocumentReady="documentReady"/>
See Also