DataGridView AutoFit and Fill

前端 未结 10 668
孤独总比滥情好
孤独总比滥情好 2020-12-02 07:37

I have 3 columns in my DataGridView. What I am trying to do is have the first 2 columns auto fit to the width of the content, and have the 3rd column fill the r

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 08:15

    Just change Property from property of control: AutoSizeColumnsMode:Fill

    OR By code

    dataGridView1.AutoSizeColumnsMode=DataGridViewAutoSizeColumnsMode.Fill;

提交回复
热议问题