GetSelectedRow

Description

Reports the number of the next highlighted row after a specified row in a DataWindow control or DataStore object.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore object


Syntax

PowerBuilder

long dwcontrol.GetSelectedRow ( long row )

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or child DataWindow.

row

A value identifying the location of the row after which you want to search for the next selected row. Specify 0 to begin searching at the first row.


Return value

Returns the number of the first row that is selected after row in dwcontrol. Returns 0 if no row is selected after the specified row.

If any argument value is null, in PowerBuilder and JavaScript the method returns null.

Usage

Rows are not automatically selected -- that is, highlighted -- when they become current. You can select a row by calling the SelectRow method.

GetSelectedRow begins its search after the specified row. It does not matter whether row itself is selected.

Examples

This statement returns the number of the first row that is selected in dw_Employee:

dw_employee.GetSelectedRow(0)

This statement returns the number of the first row that is selected beginning with row 25 in dw_Employee:

dw_employee.GetSelectedRow(25)

See also

SelectRow