Sit down, this one is huge.
Apparently Microsoft doesn’t have Windows Forms Designer support for complex controls on derived forms, in other words, if you created a form with a complex control (DataGridView is perfect candidate), made this control protected or more, derived a new form then you have problems. Nasty, huge problem if this is caused by a bug in Windows Forms Designer in 2005. The control on derived form is readonly (1) for designer – no more visual editing. Even worse, if you implemented control’s events on derived form with previous Visual Studio 200x versions designer will yield an exception (2). And this “feature” affects third party controls, too. This bug is a joke compared to this “lack of feature”.
In my view, this lockdown feature is horrible. I always used visual inheritance with 3rd party and it always worked just fine. Needless to say that this impacts design of my application tremendously. Again, if this is a new problem in WFD this has to be fixed as soon as possible – Microsoft, please?
UPDATE: The situation is unclear so far. It isn’t clear so far what is wrong with designer and if this problem was introduced with Visual Studio 2005 or if it was there before in 2003 or even 2002.
UPDATE: I checked and saw that DataGridView was locked even in beta 2 this leads me to the conclusion that the problem was always there in VS 2005.
UPDATE: To be more precise, it is up to the control itself to deny its editing in designer when it is inherited. The readonly status was therefore implemented by Microsoft (in case of DataGridView and ToolStrip) or Developer Express guys (in case of XtraGrid, XtraBars and few others).
UPDATE: I checked the Prouduct Feedback Center and of course, I am not first person to notice this problem. This is one of the MS’ response on the subject:
“Thanks for your problem report. I understand your frustration around this issue, but we disabled this scenario intentionally. We chose to not make the engineering effort it would have required to enable this scenario for Whidbey. This decision was not make lightly and we understand customers would like this functionality, but the existing visual inheritance architecture in combination with collection based controls makes it extremely costly to address. We hope to enable this in future versions. Until then, you’ll have to use code to achieve this. Thanks again for your support of Windows Forms and ToolStrips.” See the entiries here, here and here.
Now, my only hope is reduced to the fact that this problem might have been around since previous Visual Studio versions (and for sure it has been around since 2005 beta 2) which means, that, when carefuly using designer you shouldn’t have problems (assuming as I worked with Developer Express controls normally until they disabled editing in the last version.
Funny – I would be happy to know that this bug has been around for a while.