Programmatically resize a column in a Windows Forms property grid control

Using the standard Microsoft .NET 2.0 WinForms PropertyGridControl control, I was looking for a way to set the size of the two columns (one for the labels, one for the values) so that I can control better how the values are displayed.

After some research with ILSpy on the .NET sources, I found a way to use with reflection. The following helper method can be used for this task:

Call the function and pass your PropertyGrid instance and width values between e.g. 10 and 90 to resize the first column to the given percentage value.


If you specify a too small or too large value, the PropertyGrid seems to use the minimum/maximum possible, based on your passed value.

Ankommende Suchanfragen:

  • propertygrid MoveSplitterTo

Leave a Reply

Your email address will not be published. Required fields are marked *