DatagridView: Remove unused space?

前端 未结 8 1241
-上瘾入骨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 16:14

    I believe you want:

    myDataGrid.AutoSizeColumnsMode = Fill
    

    EDIT: This just resizes the columns. I'm not sure how you would get rid of row gray space other than resizing the grid's height.

提交回复
热议问题