RowCount
function : Returns the number of currently available rows for the Data window control (all rows extracted minus the number of rows deleted, plus the number of rows inserted, minus the number of rows filtered, that is, the number of rows in the current primary buffer).
function Syntax: dwcontrol. RowCount ()
parameter : Dwcontrol: Data window control name
return value : Long. Returns the number of data rows in the primary buffer when the function executes successfully, and returns 1 if an error occurs. If
The value of Dwcontrol is null, and the RowCount () function returns NULL.
Usage Description: Data rows in the Data window control's primary buffer are displayed in the Data window, and users are able to manipulate or print them. The number of data rows for this section of data can be obtained using the RowCount () function. The number of rows in the primary buffer is equal to the number of rows fetched minus the number of rows deleted, plus the number of rows inserted, minus the number of rows that were filtered out. Deleted data rows and filtered data rows are saved in the delete buffer and filter buffer of the Data window control, respectively.
code example :
Example 1. The following code gets the number of rows currently available in the Data window control Dw_employee:
Long nbrrowsnbrrows = Dw_employee.rowcount ()
Example 2. The following code detects whether the user has scrolled to the end of the Data window control. It is obtained by comparing the number of rows in the main buffer of the data window to the Lastrowonpage property of the Data Window object:
Dw_1.scrollnextpage ()
IF dw_1.rowcount () = Integer (Dw_1.describe &
"Datawindow.lastrowonpage")) Then
...//other processing required
END IF