DataControlField.Initialize(Boolean, Control) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs basic instance initialization for a data control field.
public:
virtual bool Initialize(bool sortingEnabled, System::Web::UI::Control ^ control);
public virtual bool Initialize (bool sortingEnabled, System.Web.UI.Control control);
abstract member Initialize : bool * System.Web.UI.Control -> bool
override this.Initialize : bool * System.Web.UI.Control -> bool
Public Overridable Function Initialize (sortingEnabled As Boolean, control As Control) As Boolean
Parameters
- sortingEnabled
- Boolean
A value that indicates whether the control supports the sorting of columns of data.
- control
- Control
The data control that owns the DataControlField.
Returns
Always returns false
.
Remarks
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.