ScrollLastPage

Description

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

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.ScrollLastPage ( ) 

Argument

Description

objdwcontrol

A reference to a DataWindow 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 ScrollLastPage 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 last page:

objdwEmployee.ScrollLastPage();

See also