J
jonpb
Hi. I'm using VS2008.
I have extended a DataGridView with a context menu. I want to allow
users of the grid to be able to override the default functionality of
the context menu items. So, I have members of type EventHandler that are
set to the default implementations in the constructor. The
ContextMenu.Popup handler does the layout of the menu assigning the
member delegates to the menu items in the MenuItems.Add function.
Now, if I expose the EventHandlers as Properties, the program compiles
without error but the WinForms Designer blows up when you view a form
that contains this grid. It actually goes into an infinite loop sending
multiple error boxes saying something about a property not being marked
as Serializable. The only way out is the End Task on Visual Studio. But,
the EventHandler type is marked as Serializable.
If I exposes the EventHandler as a public member, everything works fine.
Is there something I'm missing, or is this a bug in VS2008
Thanks
I have extended a DataGridView with a context menu. I want to allow
users of the grid to be able to override the default functionality of
the context menu items. So, I have members of type EventHandler that are
set to the default implementations in the constructor. The
ContextMenu.Popup handler does the layout of the menu assigning the
member delegates to the menu items in the MenuItems.Add function.
Now, if I expose the EventHandlers as Properties, the program compiles
without error but the WinForms Designer blows up when you view a form
that contains this grid. It actually goes into an infinite loop sending
multiple error boxes saying something about a property not being marked
as Serializable. The only way out is the End Task on Visual Studio. But,
the EventHandler type is marked as Serializable.
If I exposes the EventHandler as a public member, everything works fine.
Is there something I'm missing, or is this a bug in VS2008
Thanks