InvalidOperationException: This operation cannot be performed while an auto-filled column is being resized
问题 I have a form with a DataGridView and I want to set the columns AutoSizeMode to Fill and the grids ColumnHeadersHeightSizeMode to AutoSize . My problem is that if the mouse cursor accidentally hovers the upper left cell of the grid when the form loads, the application throws an InvalidOperationException . This is what I should see when the form loads: (Note how the cursor is hovering the upper left cell). This code will provoke the exception: static class Program { [STAThread] static void