Is it possible to prevent a multi line HeaderText in a DataGridView?

前端 未结 4 1480
滥情空心
滥情空心 2021-02-18 17:50

When the length of the HeaderText property reaches a certain character limit and there is a space in the text, WinForms automatically inserts a link break in the he

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-18 18:19

    You can not directly set it to false. The correct way of setting it to false is:

    this.dataGridView1.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False; 
    

提交回复
热议问题