Export (0) Print
Expand All

FormView::InitializeRow Method

Initializes the specified FormViewRow object.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

protected:
virtual void InitializeRow(
	FormViewRow^ row
)

Parameters

row
Type: System.Web.UI.WebControls::FormViewRow

The FormViewRow to initialize.

The InitializeRow method is a helper method called by the FormView control to initialize the specified FormViewRow object. The FormViewRow object is initialized based on the row type and row state specified by its RowType and RowState properties, respectively. The appropriate content is then added to the FormViewRow object. The following table describes how each row type is initialized.

Row type

Description

Data row

The contents of the ItemTemplate, EditItemTemplate, or InsertItemTemplate property are added to the FormViewRow object, depending on the value of the RowState property.

Empty data row

The value of the EmptyDataText property or the contents of the EmptyDataTemplate property is added to the FormViewRow object, depending on which property is set. If both properties are set, the EmptyDataTemplate property takes precedence.

Footer row

The value of the FooterText property or the contents of the FooterTemplate property is added to the FormViewRow object, depending on which property is set. If both properties are set, the FooterTemplate property takes precedence.

Header row

The value of the HeaderText property or the contents of the HeaderTemplate property is added to the FormViewRow object, depending on which property is set. If both properties are set, the HeaderTemplate property takes precedence.

NoteNote

This method does not initialize the pager row. To create the pager row, use the InitializePager method.

Notes to Inheritors

When extending the FormView class, you can override this method to create your own custom row.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft