ScrollNextRow  ScrollPriorRow

Chapter 9: Methods for the DataWindow Control

ScrollPriorPage

Scrolls to the prior page in a DataWindow control.

To scroll

Use

To the prior 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 prior page within the document (PowerBuilder only)

Syntax 2 For RichTextEdit DataWindows


Syntax 1 For DataWindow controls and child DataWindows

Description

Scrolls a DataWindow control backward one page, displaying another 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.) ScrollPriorPage changes the current row but not the current column.

Syntax

long dwcontrol.ScrollPriorPage ( )

Argument

Description

dwcontrol

The name of the DataWindow control or child DataWindow you want to have scroll to the prior page

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 first row. ScrollPriorPage returns -1 if an error occurs. If dwcontrol is NULL, the method returns NULL.

Usage

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


Web DataWindow

Calling ScrollNextPage causes the page to be reloaded with another set of rows from the result set.

If the DataWindow object has retrieval arguments, they must be specified in the HTMLGen.SelfLinkArgs property. For more information, see the HTMLGen.property, the Retrieve method, and the DataWindow Programmer’s Guide.

All methods that reload the page perform an AcceptText before sending data back to the server. If DeleteRow fails (returns -1), this means that pending data changes were not accepted and nothing was sent back to the server. In this situation the ItemError event occurs.


Events

ScrollPriorPage may trigger these events:

Examples

Example 1

This statement scrolls dw_employee backward one page:

dw_employee.ScrollPriorPage()

See also


Syntax 2 For RichTextEdit DataWindows

Description

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

Syntax

PowerBuilder DataWindow control

integer rtename.ScrollPriorPage ( )

Returns

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





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

View this book as PDF