Ensuring text wraps in a dataGridView column

前端 未结 9 1561
感动是毒
感动是毒 2021-01-01 17:41

I have dataGridView with a particular column. When I write long text in dataGridView it shows me a shortened version, with ellipses, because the column isn\'t wide enough to

9条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 18:07

    Try setting

    • .AutoSizeMode to .DisplayedCells.
    • Set the AutoSizeRowsMode to AllCells.
    • DataGridView.DefaultCellStyle.WrapMode to DataGridViewTriState.True

提交回复
热议问题