GetRowIdFromRow method (DataWindows)
Description
Gets the unique row identifier of a row in a DataWindow control
or DataStore object from the row number associated with that row.
Controls
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
|
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder]
|
1 |
long <span>dwcontrol</span>.<span>GetRowIdFromRow</span> (long<span> rownumber</span> {, DWBuffer <span>buffer</span> } ) |
[Web ActiveX]
|
1 |
number <span>dwcontrol</span>.<span>GetRowIdFromRow</span> (number<span> rownumber</span>, number <span>buffer</span> ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control, |
|
rownumber |
A number specifying the row number for |
|
buffer (optional) |
A value of the dwBuffer enumerated datatype |
Return Values
Returns the row identifier in buffer.
Returns 0 if the row identifier is not in the current buffer and –1
if an error occurs.
If any argument value is null, in PowerBuilder and JavaScript
the method returns null.
Usage
The row identifier value is not the same as the row number
value used in many DataWindow and DataStore function calls and should
not be used for the row number value. Instead you should first convert
the unique row identifier into a row number by calling GetRowFromRowId.
Row identifiers
The row identifier is relative to the DataWindow that currently
owns the row.
Examples
This example retrieves the current row’s
unique identifier:
|
1 |
long ll_rowid |
|
1 |
ll_rowid = dw_emp.<span>GetRowIDFromRow</span>(dw_emp.GetRow()) |