ImageField.Initialize Method
Assembly: System.Web (in system.web.dll)
public boolean Initialize ( boolean enableSorting, Control control )
public override function Initialize ( enableSorting : boolean, control : Control ) : boolean
Not applicable.
Parameters
- enableSorting
true if sorting is supported; otherwise, false.
- control
The data control that contains the ImageField.
Return Value
Always returns true.The Initialize method is called by the data control with which the ImageField object is associated to perform basic object initialization for instances of the field, before the field is ever added to a field collection. Data controls such as DetailsView and GridView call the Initialize method in their CreateChildControls methods before other methods such as CreateRow are called 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 an ImageField object. Implement this method if your ImageField-derived type requires any object initialization before it populates DataControlFieldCell objects with data or controls in the InitializeCell method.