You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you experienced this same bug with .NET Framework?: Yes
Problem description: stackoverflow
DataGridView with AutoSizeMode == Fill and ColumnHeadersHeightSizeMode == AutoSize. The 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.
The code is trying to access dataGridView.TopLeftHeaderCell, which when happens for the first time actually creates that cell and triggers some layout actions not expected at that moment.
Fix: We need to make sure that the TopLeftHeaderCell is created before DataGridView handle.
Actual behavior:
InvalidOperationException: This operation cannot be performed while an auto-filled column is being resized.
It's strange but I can't repro this issue any more with .net core 3.1 and .net5.0 😲 It's even not repro with old 3.0 Preview9 binary and 3.1.9 runtime. And it's stably reproducible on net472.
Besides runtime change, old test was on Windows7 and now I am testing on Win10 (2004)... Any thoughts?:thinking:
Problem description:
stackoverflow
DataGridView with AutoSizeMode == Fill and ColumnHeadersHeightSizeMode == AutoSize. The 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.
The code is trying to access dataGridView.TopLeftHeaderCell, which when happens for the first time actually creates that cell and triggers some layout actions not expected at that moment.
Fix: We need to make sure that the TopLeftHeaderCell is created before DataGridView handle.
Actual behavior:
InvalidOperationException: This operation cannot be performed while an auto-filled column is being resized.
Expected behavior:
No Exception.
Minimal repro:
DataGridViewTest.zip
The text was updated successfully, but these errors were encountered: