How do I get the texts within a datagridview cell to wrap texts?
I’m using VB, but C# works fine 🙂
In order to enable text wrapping in a DataGridView, you can set the WrapMode of the cell style to true. By default the WrapMode will be “NotSet,” which will cause the cells to act as if it were false.
dataGridViewName.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
I would also recommend using auto sizing on your rows depending on how much text you plan on having wrapped.
Hope this helps,
Lawrence
Please login first to submit.