The DataGridView cell shows the multi line setup method

  • 2020-05-17 05:20:05
  • OfStack

1. Set the value of RowsDefaultCellStyle's WrapMode property to true(indicating support for multi-line display)

2. Set the AllowUserToResizeColumns attribute value to true(to indicate the user's row height)

3. Set AutoSizeRowsMode property value to AllCells(indicating that all cells automatically adjust the height of the cell) and DisplayedCells property value to DisplayedCells (indicating that the current cell automatically adjusts the height of the cell, which can improve performance).

Related articles: