Search code examples
c#datagridviewdatagridviewcolumn

DataGridView DataGridViewTextBoxColumn line too long


I have a DataGridView with a DataGridViewTextBoxColumn, where DefaultCellStyle.WrapMode is set to True. The property AutoSizeRowsMode is set to DisplayedCells.

I now add a xml text to one row, that has a very long line (length > 4000 chars).

I have the problem, that this line is not shown, but just empty white space. Additionally not thew whole text is shown, but cut, so that the last line is not shown.

enter image description here

I tried to figure out the smallest number of characters in the line, that show that behaviour: if there are 5460 or more character in one line.


Solution

  • After searching around with the value 5460 I found this answer: text disapears in DatGridView Cell

    It's a bug in the DataGridView: DataGridView control shows blank cell if large string is entered and column resized to max