IsRowSelected (obsolete)

Description

Determines whether a row is selected in a DataWindow. A selected row is highlighted using reverse video.

Obsolete method

IsRowSelected is obsolete and should not be used, because the Web DataWindow technology is obsolete.

Applies to

DataWindow type

Method applies to

Web

Client control


Syntax

Web DataWindow client control

boolean dwcontrol.IsSelected ( number row ) 

Argument

Description

dwcontrol

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

row

A value identifying the row you want to test to see if it is selected


Return value

Returns true if row in dwcontrol is selected and false if it is not selected. If row is greater than the number of rows in dwcontrol or is 0 or negative, IsRowSelected also returns false.

Usage

You can call IsRowSelected in a script for the Clicked event to determine whether the row the user clicked was selected. With IsRowSelected and SelectRow, you can highlight a row on the client without causing a postback.

Examples

This code calls IsRowSelected to test whether the clicked row is selected. If the row is selected, SelectRow deselects it; if it is not selected, SelectRow selects it:

if (rowNumber > 0)
{
   if (dw_1.IsRowSelected(rowNumber))
      dw_1.SelectRow(rowNumber, false);
   else      dw_1.SelectRow(rowNumber, true);
}

See also

SelectRow