Windows Develop Bookmark and Share   
 index > Windows Forms Designer > custom DataGridView AllowUserToOrderColumns property
 

custom DataGridView AllowUserToOrderColumns property

Hello

I have a problem with a custom DataGridView. I've created a custom control inherited from DataGridView. In this custom control, I set the property "AllowUserToOrderColumns" to true.

When I use this control in a form, the designer ignores the modifications I make to this property (no code automatically added in the designer.cs).As soon as I close the form, the modification is lost.I have to set it programmaticaly to make it work.

I've seen that the solution should be to override the property in the custom control class like this :

[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public overridebool AllowUserToOrderColumns
{
....

}
But the property is not overridable !
And if I do this :
Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public new bool AllowUserToOrderColumns
{
....

}
Visual Studio just closes itself
Thanks for help
nico193  Wednesday, September 27, 2006 7:54 AM
Help really needed, please !
nico193  Tuesday, October 03, 2006 3:28 PM
No unread posts they said ...
nico193  Saturday, December 16, 2006 10:21 AM

You can use google to search for other answers

Custom Search

More Threads

• design an advanced form class and edit it in design view
• How do I work with Windows Forms (using C++) and Directx9?
• Re-render the control
• ListView misbehaving
• Multiple Managers
• drag drop usercontrol
• Disappearence of Windows Forms Designer
• treeview, filesystemwatcher, deleting nodes, and crossing thread boundries....
• Obtain the control beneath the cursor
• Multiple forms and a DataSet