Initializes the System.Web.UI.WebControls.ImageField object.
- sortingEnabled
- Documentation for this section has not yet been entered.
- control
- The data control that contains the System.Web.UI.WebControls.ImageField.
Always returns true.
The ImageField.Initialize(bool, System.Web.UI.Control) method is called by the data control with which the System.Web.UI.WebControls.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 System.Web.UI.WebControls.DetailsView and System.Web.UI.WebControls.GridView call the ImageField.Initialize(bool, System.Web.UI.Control) 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 System.Web.UI.WebControls.DataControlFieldCell objects to perform basic initialization for an System.Web.UI.WebControls.ImageField object. Implement this method if your System.Web.UI.WebControls.ImageField-derived type requires any object initialization before it populates System.Web.UI.WebControls.DataControlFieldCell objects with data or controls in the ImageField.InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, int) method.