I have a DataGridView
that I am trying to reduce the width of so it displays how I wish in my form. I am having issues "removing" the extra padding in the column names when reducing the size of the DataGridView
.
On the left is the table as I originally had it, I realized that I would like it smaller so I decreased its width. The center image represents the smallest the columns will go before the text wraps to the next line. The right image is the size I would like the table to be, I have shown that the text "(px)" will fit in the space.
I have gone through all of the settings I can find in the designer and have not found anything to help. Does anyone know how to fix this?
Here is my example. Although it might not be the best solution but worked.
I measured the exact width of
HeaderCell
's content ("Height (px)") and set the column's width with some additional padding (For example, 9).