System.Web.UI.WebControls.TableRowCollection.GetRowIndex Method

Returns a value that represents the index of the specified System.Web.UI.WebControls.TableRow from the System.Web.UI.WebControls.TableRowCollection.

Syntax

public int GetRowIndex (TableRow row)

Parameters

row
The System.Web.UI.WebControls.TableRow object to search for in the System.Web.UI.WebControls.TableRowCollection.

Returns

The ordinal index position of the specified System.Web.UI.WebControls.TableRow within the collection. The default is -1, which indicates that the specified System.Web.UI.WebControls.TableRow has not been found.

Remarks

Use this method to determine the index of the specified System.Web.UI.WebControls.TableRow in the System.Web.UI.WebControls.TableRowCollection. If the specified System.Web.UI.WebControls.TableRow is not found, an index of -1 is returned.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0