GetNextModified method (DataWindows)
Description
Reports the next row that has been modified in the specified
buffer.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Web |
Client control |
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder]
1 |
long <span>dwcontrol</span>.<span>GetNextModified</span> (long<span> row</span>, DWBuffer <span>dwbuffer</span> ) |
[Web DataWindow client control ]
1 |
number <span>dwcontrol</span>.<span>GetNextModified</span> (number <span>row</span>, number <span>column</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>GetNextModified</span> (number<span> row</span>, number <span>dwbuffer</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A name of the DataWindow control, DataStore, |
row |
A value identifying the row location |
dwbuffer |
A value of the dwBuffer enumerated datatype |
Return Values
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.
Web DataWindow
GetNextModified finds changed rows only
on the current page. The result set for the DataWindow can include
rows that are on the server but not displayed in the browser. GetNextModified cannot
find changed rows that are on the server but not on the client’s
current page.
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 |
integer rc |
1 |
long NbrRows, ll_row = 0, count = 0 |
1 |
1 |
dw_status.AcceptText() |
1 |
NbrRows = dw_status.RowCount() |
1 |
DO WHILE ll_row <= NbrRows |
1 |
ll_row = dw_status.<span>GetNextModified</span>(ll_row, Primary!) |
1 |
IF ll_row > 0 THEN |
1 |
count = count + 1 |
1 |
ELSE |
1 |
ll_row = NbrRows + 1 |
1 |
END IF |
1 |
LOOP |
1 |
MessageBox("Modified Count", & |
1 |
String(count) & |
1 |
+ " rows were modified.") |