ScrollFirstPage

Description

Scrolls a Web DataWindow client 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 Web DataWindow client control at one time.) ScrollFirstPage changes the current row, but not the current column.

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.ScrollFirstPage ( ) 

Argument

Description

objdwcontrol

A reference to a Web DataWindow client control

Returns

Returns -1 if AcceptText fails and 1 otherwise. AcceptText is called for all methods that reload the page before sending data to the server.

Usage

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

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. Use the server-side AfterPerformAction event to detect and handle the failure appropriately.

The AfterPerformAction event handler receives an argument of type AfterPerformActionEventArgs that contains an Action property that indicates the client DataWindow postback action, and an ActionResult property that contains the value 1 for success or -1 for failure.

Examples

Example 1

This statement scrolls dwEmployee to the first page:

objdwEmployee.ScrollFirstPage();

See also