I have a form with a DataGridView and I want to set the columns AutoSizeMode to Fill and the grids ColumnHeadersHeightSizeMode
DataGridView
AutoSizeMode
Fill
ColumnHeadersHeightSizeMode
In .net core (3.1.9) and .net5.0 this is not reproducible. There was no directly fix, but somehow there are no exception any more. See (and post if you still have this issue): https://github.com/dotnet/winforms/issues/1830.