Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

winforms - datagridview row height doesn't resize when defaultcellstyle is set to wrapmode

i have a datagrid that displays long text on couple columns. I have set the cells defaultcellstyle to wrap. This works but now the row height doesn't change to compensate for the wrapped text & the text is getting cut-off.

What am i missing?

TIA

like image 411
SoftwareGeek Avatar asked Apr 26 '10 18:04

SoftwareGeek


1 Answers

Set the DataGridView.AutoSizeRowsMode to AllCells or DisplayedCells and it is done automatically. More information about the various sizing options is available in this MSDN Library article.

like image 134
Hans Passant Avatar answered Oct 06 '22 17:10

Hans Passant