DataGridView - how to set column width?

后端 未结 13 2306
情书的邮戳
情书的邮戳 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:47

    Use the Columns Property and set the Auto Size Mode to All Cells, Resizable to True, Frozen to False and visible to True.

    The column will automatically resize based on the data inserted.

提交回复
热议问题