ScrollFirstPage method (DataWindows)
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.
Controls
DataWindow type |
Method applies to |
---|---|
Web |
Client control |
Syntax
[Web DataWindow client control]
1 |
number <span>dwcontrol</span>.<span>ScrollFirstPage</span> ( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control |
Return Values
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:
-
ItemChanged
-
ItemError
-
ItemFocusChanged
-
RowFocusChanged
-
RowFocusChanging
Examples
This statement scrolls dw_employee to the
first page:
1 |
dw_employee.<span>ScrollFirstPage</span>(); |