DatagridView: Remove unused space?

前端 未结 8 1124
-上瘾入骨i
-上瘾入骨i 2021-01-11 15:25

I was wondering whether it is possible to remove the unused space ( the gray space ) of the DataGridView control in C#. I have to make the DataGridView

8条回答
  •  伪装坚强ぢ
    2021-01-11 15:49

    Sometimes (especially with winforms) the best way is to hack:

    dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
    

    I stole it from this post: removing the empty gray space in datagrid in c#

提交回复
热议问题