Reputation: 15715
Apparently, the only way to have multiline cells in a DataGridView
is by setting the WrapMode
of its DefaultCellStyle
to true
. My problem is that I also want the width of the column to adjust automatically to the content of the cell, instead of wrapping it by adding line breaks.
Even if I set AutoSizeColumnsMode
to AllCells
, it will wrap the text instead of making the header bigger. I would also like the row height to adjust automatically. So I don't really want to wrap anything at all. Just adjust width and height to the size of the text.
Upvotes: 2
Views: 7334