CB
Clay Burch
Syncfusion Team
June 12, 2002 04:10 AM UTC
If you have dropped a datagrid onto your form with the designer, then this datagrid is defined as
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
and created with this code
Me.DataGrid1 = New System.Windows.Forms.DataGrid()
So, the grid being displayed is NOT your MyDataGrid class, but the Systems.Windows.Forms.DataGrid. What you have to do is to make your code use your class. One way to do this is to just change the two statements (even though there are dire warnings about doing so as this code is part of the designer created code).
Friend WithEvents DataGrid1 As MyDataGrid
and
Me.DataGrid1 = New MyDataGrid()