ScrollFirstPage

Description

Scrolls a Web DataWindow control to the first page, displaying the result set’s first group of rows in the Web page. (A page is the number of rows that are displayed in the DataWindow control at one time.) ScrollFirstPage changes the current row, but not the current column.

Applies to

DataWindow type

Method applies to

Web

Client control

Syntax

Web DataWindow client control

number dwcontrol.ScrollFirstPage ( ) 

Argument

Description

dwcontrol

A reference to a DataWindow control

Returns

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

If dwcontrol is null, the method returns null.

Usage

Calling ScrollFirstPage 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 Programmers Guide.

All methods that reload the page perform an AcceptText before sending data back to the server. If the method 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

ScrollNextPage may trigger these events:

Examples

Example 1

This statement scrolls dw_employee to the first page:

dw_employee.ScrollFirstPage();

See also