DataGridView AutoFit and Fill

前端 未结 10 665
孤独总比滥情好
孤独总比滥情好 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条回答
  •  猫巷女王i
    2020-12-02 08:02

    Try this :

      DGV.AutoResizeColumns();
      DGV.AutoSizeColumnsMode=DataGridViewAutoSizeColumnsMode.AllCells;
    

提交回复
热议问题