This documentation is archived and is not being maintained.

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
public boolean Initialize (
	boolean sortingEnabled, 
	Control control
public function Initialize (
	sortingEnabled : boolean, 
	control : Control
) : boolean
Not applicable.



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


The data control that owns the DataControlField.

Return Value

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.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0