ScrollLastPage  ScrollNextRow

Chapter 9: Methods for the DataWindow Control

ScrollNextPage

Scrolls to the next page in a DataWindow.

To scroll

Use

To the next group of rows in a DataWindow (when the DataWindow does not have the RichTextEdit presentation style)

Syntax 1 For DataWindow controls and child DataWindows

A RichTextEdit DataWindow to view the next page within the document (PowerBuilder only)

Syntax 2 For RichTextEdit DataWindows


Syntax 1 For DataWindow controls and child DataWindows

Description

Scrolls a DataWindow control forward one page, displaying the next group of rows in the DataWindow’s display area. (A page is the number of rows that can be displayed in the DataWindow control at one time.) ScrollNextPage changes the current row, but not the current column.

Syntax

long dwcontrol.ScrollNextPage ( )

Argument

Description

dwcontrol

A reference to a DataWindow control or child DataWindow

Returns

Returns the number of the row displayed at the top of the DataWindow control when the scroll finishes or tries to scroll past the last row. ScrollNextPage returns 1 with nested or composite reports and child DataWindows since, in these cases, the current row cannot be changed. ScrollNextPage returns -1 if an error occurs.

If dwcontrol is NULL, the method returns NULL.

Usage

ScrollNextPage does not highlight the current row. Use SelectRow to let the user know what row is current.

For an example that uses RowCount and Describe to check whether the user has scrolled to the last page, see RowCount.


Events

ScrollNextPage can trigger these events:

Examples

Example 1

This statement scrolls dw_employee forward one page:

dw_employee.ScrollNextPage()

See also


Syntax 2 For RichTextEdit DataWindows

Description

Scrolls to the next page of the document in a RichTextEdit DataWindow.

Syntax

PowerBuilder DataWindow control

integer rtedwname.ScrollNextPage ( )

Returns

Returns 1 if it succeeds and -1 if an error occurs. If rtedwname is NULL, in PowerBuilder and JavaScript the method returns NULL.





Copyright © 2004. Sybase Inc. All rights reserved. ScrollNextRow

View this book as PDF