Column row break in Windows Forms

I am using the DataGridView component in Windows Forms.Net. How to split a row into a column? "\ n \ r" doesn'work.

+4
source share
1 answer

Edit the column, edit the DefaultCellStyle property, and set the WrapMode property to True. And change the DGV AutoSizeRowMode, say AllCells, so that the line automatically grows in height to fit the text. The text in the column heading and cells now automatically wrap text. You can use "\ n" to force the transfer.

+6
source

Source: https://habr.com/ru/post/1309778/


All Articles