Howto :: Multiline DataGridView :: More precisely a Multiline DataGridViewTextBoxColumn

G

Gordian

Hi,

I found less in the docs about a Multiline DataGridView.
More precisely a Multiline DataGridViewTextBoxColumn

---------------
I found the following infos:

multiline datagridview cells? ...
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=4334

DataGridViewCellStyle.WrapMode Property ...
http://whidbey.msdn.microsoft.com/l...dows_Forms_DataGridViewCellStyle_WrapMode.asp

Sizing Options in the Windows Forms DataGridView Control ...
http://msdn2.microsoft.com/library/74b2wakt(en-us,vs.80).aspx

---------------
This example works for me, but does anyone have any suggestion for
improvement?


dgv.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
DataGridViewCellStyle cellStyle = new DataGridViewCellStyle();
cellStyle.WrapMode = DataGridViewTriState.True;
dgv.Columns["LongText"].DefaultCellStyle = cellStyle;


Greetings Gordian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top