FormViewRow Class
Represents a row within a FormView control.
Assembly: System.Web (in System.Web.dll)
The FormViewRow class is used to represent an individual row in a FormView control. Each row in the FormView control has a designated row type. The following table lists the different row types.
Row type | Description |
|---|---|
DataControlRowType.DataRow | The data row in the FormView control. |
DataControlRowType.EmptyDataRow | The empty data row in the FormView control. The empty data row is displayed in a FormView control when there are no records to display. |
DataControlRowType.Footer | The footer row in the FormView control. |
DataControlRowType.Header | The header row in the FormView control. |
DataControlRowType.Pager | A pager row in the FormView control. |
To determine the row type of a FormViewRow object, use the RowType property. A FormViewRow 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 |
|---|---|
DataControlRowState.Edit | The FormViewRow object is in edit mode. |
DataControlRowState.Insert | The FormViewRow object is in insert mode. |
DataControlRowState.Normal | The FormViewRow object is in its normal (default) state. |
DataControlRowState.Selected | The FormViewRow object is selected. |
To determine the state of a FormViewRow object, use the RowState property.
The FormView control displays the contents of its ItemTemplate property in a data row. To access the data row, use the Row property. To determine the index of the current data item in the data source, use the ItemIndex property.
You can access the individual cells of the FormViewRow object by using the Cells property. If a cell contains controls, you can retrieve a control from the cell by using one of the following methods:
Use the Controls collection of the cell to retrieve the control at a specific index.
Use the FindControl method of the cell to retrieve the control, if the control has its ID property set. This is the preferred method to retrieve a control from a cell.
For a list of initial property values for an instance of the FormViewRow class, see the FormViewRow constructor.
- AspNetHostingPermission
For operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
For operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.Web.UI::Control
System.Web.UI.WebControls::WebControl
System.Web.UI.WebControls::TableRow
System.Web.UI.WebControls::FormViewRow
System.Web.UI.WebControls::FormViewPagerRow
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.