DatagridView: Remove unused space?

前端 未结 8 1257
-上瘾入骨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:59

    Well, I toiled to find an answer for this before but in the end if you want to mimic an empty DataGridView then the long answer is to create "White" Rectangle objects and use Graphics to fill the whole grid on an overriden OnPaint method.

提交回复
热议问题