DataGridView Autosize but restrict max column size
Posted
by aaginor
on Stack Overflow
See other posts from Stack Overflow
or by aaginor
Published on 2010-06-15T13:56:06Z
Indexed on
2010/06/15
14:02 UTC
Read the original article
Hit count: 343
c#
|datagridview
Hi folks,
in my C# 4.0 Application, I have a DataGridView to display some data. I want the Columns size accordingly to the content, so I set the AutoSizeColumnsMode to AllCellsExceptHeader. But I want to restrict the columns to grow beyond a certain value. There is a MinimumWidth Property ... but unfortunately no MaximumWidth Property.
Any ideas how to solve this?
Thanks in advance, Frank
© Stack Overflow or respective owner