Jayesh Modha
2008-06-10 22:11:12 UTC
Hi,
I am using .NET CF 3.5 and Windows CE.
I have inherited DataGrid and made my custom DataGrid. I just have few
function on my custom datagrid.
After adding my custom DataGrid to my form, the designer add following
lines to my InitializeComponent.
((System.ComponentModel.ISupportInitialize)(this.myGrid)).BeginInit();
.
.
.
.
.
((System.ComponentModel.ISupportInitialize)(this.myGrid)).EndInit();
.NET CF DataGrid does not support ISupportInitialize but still
desinger is adding that and runtime I get Invalid Cast Exception as it
can not convert DataGrid to ISupportInitialize.
If I use just CF standard DataGrid, it does not add the above
statement to InitializeComponent.
CF DataGrid does not support ISupportInitialize interface and full
framework DataGrid supports ISupportInitialize interface.
I am wondering why this happens with inheriting DataGrid control and
not with CF DataGrid.
Is this a Designer bug?
Please help.
Thanks,
Jayesh Modha
I am using .NET CF 3.5 and Windows CE.
I have inherited DataGrid and made my custom DataGrid. I just have few
function on my custom datagrid.
After adding my custom DataGrid to my form, the designer add following
lines to my InitializeComponent.
((System.ComponentModel.ISupportInitialize)(this.myGrid)).BeginInit();
.
.
.
.
.
((System.ComponentModel.ISupportInitialize)(this.myGrid)).EndInit();
.NET CF DataGrid does not support ISupportInitialize but still
desinger is adding that and runtime I get Invalid Cast Exception as it
can not convert DataGrid to ISupportInitialize.
If I use just CF standard DataGrid, it does not add the above
statement to InitializeComponent.
CF DataGrid does not support ISupportInitialize interface and full
framework DataGrid supports ISupportInitialize interface.
I am wondering why this happens with inheriting DataGrid control and
not with CF DataGrid.
Is this a Designer bug?
Please help.
Thanks,
Jayesh Modha