GetNextModified
method (DataWindows)
Description
Reports the next row that has been modified in the specified
buffer.
Applies to
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Syntax
PowerBuilder
|
1 |
long dwcontrol.GetNextModified (long row, DWBuffer dwbuffer ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A name of the DataWindow control, DataStore, or child |
|
row |
A value identifying the row location after which you |
|
dwbuffer |
A value of the dwBuffer enumerated datatype |
Return value
Returns the number of the first row that was modified after row in
dwbuffer in dwcontrol. Returns 0 if there are no modified rows after the
specified row.
If any argument value is null, in PowerBuilder and JavaScript the
method returns null.
Usage
PowerBuilder stores the update status of rows and columns in the
DataWindow. The status settings indicate whether a row or column is new or
has been modified. GetNextModified reports rows with the status
NewModified! and DataModified!.
For more information on the status of rows and columns, see GetItemStatus and SetItemStatus.
Using GetNextModified on the delete buffer will return rows that
have been modified and then deleted. The DeletedCount method will report
the total number of deleted rows.
GetNextModified begins searching in the row after the value you
specify in row. This is different from the behavior of Find,
FindGroupChange, and FindRequired, which begin searching in the row you
specify.
Total number of modified rows
You can use the ModifiedCount method to find out the total number
of modified rows in the primary and filter buffers.
Examples
These statements count the number or rows that were modified in the
primary buffer for dw_status and then display a message reporting the
number modified:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
integer rc long NbrRows, ll_row = 0, count = 0 dw_status.AcceptText() NbrRows = dw_status.RowCount() DO WHILE ll_row <= NbrRows ll_row = dw_status.GetNextModified(ll_row, Primary!) IF ll_row > 0 THEN count = count + 1 ELSE ll_row = NbrRows + 1 END IF LOOP MessageBox("Modified Count", & String(count) & + " rows were modified.") |
See also