SelectRow

Description

Highlights or removes highlights from rows in a DataWindow control or DataStore. You can select all rows or a single row. SelectRow does not affect which row is current. It does not select rows in the database.

Applies to

Web DataWindow client control

Syntax

void dwcontrol.SelectRow ( number row, boolean select ) 

Argument

Description

dwcontrol

A reference to a Web DataWindow client control.

row

A value identifying the row you want to select or deselect. Specify 0 to select or deselect all rows.

select

A boolean value that determines whether the row is selected or not selected:

  • True – Select the row(s) so that they are highlighted.

  • False – Deselect the row(s) so that they are not highlighted.

Returns

Returns 1 if it succeeds and -1 if an error occurs. If there is no DataWindow object assigned to the Web DataWindow client control, the method returns 1.

Usage

If a row is already selected and you specify that it be selected (boolean is true), it remains selected. If a row is not selected and you specify that it not be selected (boolean is false), it remains unselected. With IsRowSelected and SelectRow, you can highlight a row on the client without causing a postback.

Examples

Example 1

This statement selects the fifteenth row in dw_employee:

dw_employee.SelectRow(15, true)

See also