System.Web.UI.WebControls.DataControlRowState Enumeration

Specifies the state of a row in a data control, such as System.Web.UI.WebControls.DetailsView or System.Web.UI.WebControls.GridView.

Syntax

[System.Flags]
public enum DataControlRowState

Remarks

The System.Web.UI.WebControls.DataControlRowState enumeration identifies the state of a row in a data control such as System.Web.UI.WebControls.DetailsView or System.Web.UI.WebControls.GridView. A row's state can be one or a combination of the System.Web.UI.WebControls.DataControlRowState values, so use bitwise operations to determine whether the state of the row includes a System.Web.UI.WebControls.DataControlRowState value, rather than an equivalence test. The System.Web.UI.WebControls.DataControlRowState enumeration is used for any type of row, not just DataControlRowType.DataRow rows (typically, the state of header and footer rows is set to DataControlRowState.Normal).

You can use the System.Web.UI.WebControls.DataControlRowState enumeration to identify the state of a System.Web.UI.WebControls.GridViewRow or System.Web.UI.WebControls.DetailsViewRow object when enumerating through a System.Web.UI.WebControls.GridViewRowCollection or System.Web.UI.WebControls.DetailsViewRowCollection collection, respectively. If you are writing a data control that uses rows, you can use the System.Web.UI.WebControls.DataControlRowState enumeration to identify when to render different colors for a row (the DataControlRowState.Alternate value), or controls that are enabled or disabled for editing a row (the DataControlRowState.Edit and DataControlRowState.Insert values).

Members

Member NameDescription
Alternate

Indicates that the data control row is an alternate row.

Edit

Indicates that the row is in an edit state, often the result of clicking an edit button for the row. Typically, the DataControlRowState.Edit and DataControlRowState.Insert states are mutually exclusive.

Insert

Indicates that the row is a new row, often the result of clicking an insert button to add a new row. Typically, the DataControlRowState.Insert and DataControlRowState.Edit states are mutually exclusive.

Normal

Indicates that the data control row is in a normal state. The DataControlRowState.Normal state is mutually exclusive with other states except the DataControlRowState.Alternate state.

Selected

Indicates that the row has been selected by the user.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0