A
andrei
Hi Group,
I have a class which inherits from Windows.Forms.DataGrid.
Imports System.Drawing
Imports System.Windows.Forms
Public Class MyDataGrid : Inherits System.Windows.Forms.DataGrid
....
Then, inside the class I use a DataGridTableStyle and I add columns derived
from DataGridTextBoxColumn, so I can customize the behaviour.
Next, on a form, I place a regular Datagrid, then I switch to the code and I
replace wherever I find a reference to System.Windows.Forms.DataGrid with
MyDataGrid. So now, the program will use MyDataGrid.
Everything works fine, it compiles, it runs ok. But when I switch back to
the designer, the control
representing the datagrid dissapears.
I've been looking on the internet for articles, and some described the
replacing of a datagrid with a derived datagrid in exactly the same steps.
They were saying that you need to rebuild your projecct in order for your
datagrid not to dissapear.
I've done that, but nothing has changed...
What am I doing wrong ?
Or is it a better way of doing it ?
Any help would be appreciated ! Thanks !
Andrei.
I have a class which inherits from Windows.Forms.DataGrid.
Imports System.Drawing
Imports System.Windows.Forms
Public Class MyDataGrid : Inherits System.Windows.Forms.DataGrid
....
Then, inside the class I use a DataGridTableStyle and I add columns derived
from DataGridTextBoxColumn, so I can customize the behaviour.
Next, on a form, I place a regular Datagrid, then I switch to the code and I
replace wherever I find a reference to System.Windows.Forms.DataGrid with
MyDataGrid. So now, the program will use MyDataGrid.
Everything works fine, it compiles, it runs ok. But when I switch back to
the designer, the control
representing the datagrid dissapears.
I've been looking on the internet for articles, and some described the
replacing of a datagrid with a derived datagrid in exactly the same steps.
They were saying that you need to rebuild your projecct in order for your
datagrid not to dissapear.
I've done that, but nothing has changed...
What am I doing wrong ?
Or is it a better way of doing it ?
Any help would be appreciated ! Thanks !
Andrei.