'DataGridView - extra grey space after last row

I have a DataGridView with two columns. After the last row I have some gray space. It is exactly the same problem here but it is unsolved DataGridView showing some extra space after last row

How can I get rid of this extra gray space on the bottom?

Edit: Here you can download preview that I am talking about: https://github.com/pr0s3q/DataGridViewError

Unwanted grey space



Solution 1:[1]

The problem got fixed by changing datagridview height. My images have 85px height, so I need to fit specific number of them (i.e. 4, not 3.5) So 85x4 = 340, adding inner margins, I need to have 347px height in order to not see this ugly gray space

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 krzysiu858519581