System.Web 2.0.0.0 System.Web.UI.WebControls.TableRow

The class is used to represent an individual row in a control. Each row in the control has a designated row type. The following table lists the row types that are valid for the control.

Row type

Description

A data row in the control.

The empty data row in the control. The empty data row is displayed in a control when there are no records to display.

The footer row in the control.

The header row in the control.

A pager row in the control.

To determine the row type of a object, use the property. A object also has a state associated with it. The state can be a bitwise combination of the values in the following table.

State value

Description

The object is an alternate row in the control.

The object is in edit mode.

The object is in insert mode.

The object is in its normal (default) state.

To determine the state of a object, use the property.

The control stores all its data rows in the collection. To determine the index of a object in the collection, use the property.

You can access the individual cells of the object by using the property. If a cell contains controls, you can retrieve a control from the cell by using the collection of the cell. You can also use the method of the cell to find the control, if the control has an property specified.

To retrieve a field value from a field column or an automatically generated field column, use the property of the cell. To retrieve a field value from other field column types where the field value is bound to a control, first retrieve the control from the appropriate cell and then access the appropriate property of the control.

It is possible to use a data-binding expression directly in a field column without binding the value to a property of a control. In this case, the field value is automatically placed in a control. To retrieve the field value, you must first retrieve the control from the appropriate cell and then use its property.

For a list of initial property values for an instance of the class, see the constructor.

Represents a row within a control.

- Constructor

  Use this constructor to initialize a new instance of the class.

  The following table shows initial property values for an instance of the class.

  Property

  Initial value

  The value specified by the parameter.

  The value specified by the parameter.

  The value specified by the parameter.

  Initializes a new instance of the class.

  The index of the row in the collection of the control.
  One of the enumeration values.
  One of the enumeration values.
  2.0.0.0
- Method
  System.Boolean `` `` To be added.

  Determines whether to pass an event up the page's ASP.NET server control hierarchy.

  true if the event has been canceled; otherwise, false.

  The source of the event. An that contains the event data. 2.0.0.0
- Property
  System.Int32 To be added.

  Use the property to determine the index of a object in the collection of the control.

  This property applies only to data rows.

  Gets the index of the object in the collection of the control.

  2.0.0.0
- Property
  System.Web.UI.WebControls.DataControlRowState To be added.

  Use the property to determine the state of the row. The state can be a bitwise combination of the values in the following table.

  State value

  Description

  DataControlRowState.Alternate

  The object is an alternate row in the control.

  DataControlRowState.Edit

  The object is in edit mode.

  DataControlRowState.Insert

  The object is in insert mode.

  DataControlRowState.Normal

  The object is in its normal (default) state.

  This property is commonly used to determine the state of a row before performing an operation.

  Gets the state of the object.

  2.0.0.0
- Property
  System.Web.UI.WebControls.DataControlRowType To be added.

  Use the property to determine the type of row that the object represents. The following table lists the valid row type values.

  Row type

  Description

  DataControlRowType.DataRow

  A data row in the control.

  DataControlRowType.EmptyDataRow

  The empty data row in the control. The empty data row is displayed in a control when there are no records to display.

  DataControlRowType.Footer

  The footer row in the control.

  DataControlRowType.Header

  The header row in the control.

  DataControlRowType.Pager

  A pager row in the control.

  This property is commonly used to determine a row's type before performing an operation.

  Gets the row type of the object.

  2.0.0.0