There are a few properties of DataGridViewColumn which play a role in the width of the column, including DataGridViewColumn.Width, DataGridViewColumn.AutoSizeMode, DataGridViewColumn.MinimumWidth, FillWight, DataGridView.AutoSizeColumnsMode.
I can highlight 2-3 interesting scenario to to resize columns in larger screens:
- You want all the columns have equal size and fill the width of the grid, and grow equally if size of form changes: So set the
AutoSizeMode
of all the columns toFill
. - You want the columns have different sizes, but fill the width of the grid and grow relatively when the size of form changes: So set the
AutoSizeMode
of all the columns toFill
, and set the properFillWidth
, which will be used as the weight of the column when resizing. - You want all the columns keep their size, but a specific column (like last column) fill the width of grid when the size of form changes: Set the column size modes to something like
None
, but for that specific column set it toFill
.
And you can also find some useful scenarios and settings about sizing of the columns and rows, including sizing based on the content, in the following doc: