This documentation is archived and is not being maintained.

DataGridDesigner.Initialize Method

Initializes the designer with the specified DataGrid control.

[Visual Basic]
Overrides Public Sub Initialize( _
   ByVal component As IComponent _
) Implements IDesigner.Initialize
[C#]
public override void Initialize(
 IComponent component
);
[C++]
public: void Initialize(
 IComponent* component
);
[JScript]
public override function Initialize(
   component : IComponent
);

Parameters

component
The IComponent for the designer.

Implements

IDesigner.Initialize

Example

[Visual Basic] The following code example overrides the Initialize method to allow the designer class to display only instances of the SimpleDataGrid class.

[Visual Basic] This example is part of a larger example provided for the DataGridDesigner class.

[Visual Basic] 
' Override the Initialize method to ensure that
' only an instance of the SimpleDataGrid class is 
' used by this designer class.
Public Overrides Sub Initialize(component As IComponent)
   Debug.Assert( _
     TypeOf component Is SimpleDataGrid, _
     "SimpleDataGridDesigner::Initialize - Invalid SimpleDataGrid Control")
   
   simpleGrid = CType(component, SimpleDataGrid)

   MyBase.Initialize(component)
End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

DataGridDesigner Class | DataGridDesigner Members | System.Web.UI.Design.WebControls Namespace | IDesigner

Show: