Export (0) Print
Expand All

DataControlField.Initialize Method

Performs basic instance initialization for a data control field.

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

public virtual bool Initialize(
	bool sortingEnabled,
	Control control
)

Parameters

sortingEnabled
Type: System.Boolean

A value that indicates whether the control supports the sorting of columns of data.

control
Type: System.Web.UI.Control

The data control that owns the DataControlField.

Return Value

Type: System.Boolean
Always returns false.

The control that the DataControlField object is associated with calls the Initialize method to initialize the field before it is added to a rows collection. Data controls such as DetailsView and GridView call the Initialize method in their CreateChildControls methods before calling other methods such as CreateRow to create specific rows with data.

Call this method when you are writing a custom data-bound control that uses DataControlFieldCell objects to perform basic initialization for any DataControlField objects. Implement this method if your derived type requires any object initialization before it populates DataControlFieldCell objects with data or controls in the InitializeCell method.

.NET Framework

Supported in: 4.5.2, 4.5.1, 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