Skip to main content

RichEditScroll.setByDocumentPosition(position) Method

Scrolls the document to the specified position


    position: number,
    subDocumentId?: number,
    pageIndex?: number
): void


Name Type Description
position number

The position in a document model.

subDocumentId number

An identifier of a sub-document.

pageIndex number

The page index.


The setByDocumentPosition method searches the specified sub-document (subDocumentId) on the specified page (pageIndex). If the document is found, the method scrolls the document until the specified position (position) is displayed on the screen.

If the specified position is more than the length of the sub-document, the last sub-document position is displayed.

The pageIndex parameter is not in effect if the subDocumentId parameter species the main sub-document.

The subDocumentId and pageIndex parameters’ default value is equal to 0.

<dx:ASPxRichEdit ID="DemoRichEdit" runat="server" ClientInstanceName="richEdit" />
//scroll to a header on the third page
//scroll to the last position in the main sub-document
See Also