GetRowIdFromRow  GetSQLPreview

Chapter 9: Methods for the DataWindow Control

GetSelectedRow

Description

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

Syntax

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.

Returns

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, 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

Example 1

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

dw_employee.GetSelectedRow(0)

Example 2

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





Copyright © 2004. Sybase Inc. All rights reserved. GetSQLPreview

View this book as PDF