System.Web.UI.WebControls.FormViewRow Class

Represents a row within a System.Web.UI.WebControls.FormView control.

See Also: FormViewRow Members

Syntax

public class FormViewRow : TableRow

Remarks

The System.Web.UI.WebControls.FormViewRow class is used to represent an individual row in a System.Web.UI.WebControls.FormView control. Each row in the System.Web.UI.WebControls.FormView control has a designated row type. The following table lists the different row types.

DataControlRowType.DataRow

The data row in the System.Web.UI.WebControls.FormView control.

DataControlRowType.EmptyDataRow

The empty data row in the System.Web.UI.WebControls.FormView control. The empty data row is displayed in a System.Web.UI.WebControls.FormView control when there are no records to display.

DataControlRowType.Footer

The footer row in the System.Web.UI.WebControls.FormView control.

DataControlRowType.Header

The header row in the System.Web.UI.WebControls.FormView control.

DataControlRowType.Pager

A pager row in the System.Web.UI.WebControls.FormView control.

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

DataControlRowState.Edit

The System.Web.UI.WebControls.FormViewRow object is in edit mode.

DataControlRowState.Insert

The System.Web.UI.WebControls.FormViewRow object is in insert mode.

DataControlRowState.Normal

The System.Web.UI.WebControls.FormViewRow object is in its normal (default) state.

DataControlRowState.Selected

The System.Web.UI.WebControls.FormViewRow object is selected.

To determine the state of a System.Web.UI.WebControls.FormViewRow object, use the FormViewRow.RowState property.

The System.Web.UI.WebControls.FormView control displays the contents of its FormView.ItemTemplate property in a data row. To access the data row, use the FormView.Row property. To determine the index of the current data item in the data source, use the FormViewRow.ItemIndex property.

You can access the individual cells of the System.Web.UI.WebControls.FormViewRow object by using the TableRow.Cells property. If a cell contains controls, you can retrieve a control from the cell by using one of the following methods:

For a list of initial property values for an instance of the System.Web.UI.WebControls.FormViewRow class, see the FormViewRow.#ctor(int, DataControlRowType, DataControlRowState) constructor.

Requirements

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