ScrollNextPage

Description

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

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.ScrollNextPage ( ) 

Argument

Description

objdwcontrol

A reference to a DataWindow control or child DataWindow

Returns

Returns -1 if AcceptText fails and otherwise 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. ScrollNextPage returns 1 with nested or composite reports since, in these cases, the current row cannot be changed. AcceptText is called for all methods that reload the page before sending data to the server.

Usage

Calling ScrollNextPage 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.