GetClickedRow method (DataWindows)
Description
Obtains the number of the row the user clicked or double-clicked
in a DataWindow control or DataStore object.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataStore object |
Web |
Client control |
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
1 |
long <span>dwcontrol</span>.<span>GetClickedRow</span> ( ) |
[Web DataWindow client control and Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>GetClickedRow</span> ( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or |
Return Values
Returns the number of the row that the user clicked or double-clicked
in dwcontrol. Returns 0 if the user did not
click or double-click a row (for example, the user double-clicked
outside the data area, in text or spaces between rows, or in the
header, summary, or footer area).
If dwcontrol is null, in PowerBuilder
and JavaScript the method returns null.
Usage
Call GetClickedRow in the Clicked or DoubleClicked
event for a DataWindow control.
When the user clicks on the row, that row becomes the current
row after the Clicked or DoubleClicked event is finished. During
those events, GetRow and GetClickedRow can
return different values.
If the user arrived at a row by another means, such as tabbing, GetClickedRow cannot
identify that row. Use GetRow instead to identify the
current row.

The GetClickedRow method does not work
on child DataWindows.
Examples
These statements return the number of the row the
user clicked or double–clicked in dw_Employee:
1 |
long li_RowNbr |
1 |
li_RowNbr = dw_employee.<span>GetClickedRow</span>() |