DataGridView - how to set column width?

后端 未结 13 2270
情书的邮戳
情书的邮戳 2020-12-13 23:58

I have a WinForms application with DataGridView control. My control has five columns (say \"Name\", \"Address\", \"Phone\" etc)

I am not happy with defa

相关标签:
13条回答
  • 2020-12-14 00:55

    The following also can be tried:

    DataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells
    

    or use the other setting options in the DataGridViewAutoSizeColumnsMode Enum

    0 讨论(0)
提交回复
热议问题