ScrollNextRow

Scrolls to the next row in a DataWindow control.

To scroll

Use

To the next row in a DataWindow, making the row current (when the DataWindow does not have the RichTextEdit presentation style)

Syntax 1 For DataWindow controls and child DataWindows

To the next instance of a document associated with a row in a RichTextEdit DataWindow (PowerBuilder only)

Syntax 2 For RichTextEdit DataWindows


Syntax 1 For DataWindow controls and child DataWindows

Description

Scrolls a DataWindow control to the next row (forward one row). ScrollNextRow changes the current row, but not the current column.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

PowerBuilder

long dwcontrol.ScrollNextRow ( )

Web ActiveX

number dwcontrol.ScrollNextRow ( ) 

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. ScrollNextRow returns –1 if an error occurs.

If dwcontrol is null, in PowerBuilder and JavaScript the method returns null.

Usage

After you call ScrollNextRow, the row after the current row becomes the new current row. If that row is already visible, the displayed rows do not change. If it is not visible, the displayed rows move up to display the row.

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


Events

ScrollNextRow triggers these events in the order shown:

You should not use ScrollNextRow in the ScrollVertical event. Doing so causes this series of events to be triggered repeatedly until the last row in the DataWindow is reached.

Examples

Example 1

This statement scrolls dw_employee to the next row:

dw_employee.ScrollNextRow()

See also


Syntax 2 For RichTextEdit DataWindows

Description

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

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

integer rtename.ScrollNextRow ( )

Argument

Description

rtename

A reference to a DataWindow control in which you want to scroll to the next document instance. Each instance is associated with a DataWindow row.

The DataWindow object in the DataWindow control must be a RichTextEdit DataWindow.

Returns

Returns 1 if it succeeds and –1 if an error occurs.

Usage

A DataWindow control with a RichText DataWindow object has multiple instances of the RichText document, where each instance is associated with one row of retrieved data.

ScrollNextRow advances to the next instance of the RichTextEdit document. In contrast, repeated calls to ScrollNextPage advance through all the pages of the document instance and then on to the pages for the next row.

NotePowerBuilder RichTextEdit control You can use the same syntax with any PowerBuilder RichTextEdit control. See ScrollNextRow in the PowerScript Reference.

Examples

Example 2

This statement scrolls to the next instance of the RichText document in the DataWindow control dw_rpt. (Each document instance is associated with a row of data):

dw_rpt.ScrollNextRow()

See also