diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridView.Methods.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridView.Methods.cs index 2ce5e73dd45..0ab7fc2fc59 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridView.Methods.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridView.Methods.cs @@ -27484,7 +27484,8 @@ protected virtual bool SetCurrentCellAddressCore(int columnIndex, { int oldCurrentCellX = _ptCurrentCell.X; int oldCurrentCellY = _ptCurrentCell.Y; - if (oldCurrentCellX >= 0 + if (IsHandleCreated + && oldCurrentCellX >= 0 && !_dataGridViewState1[State1_TemporarilyResetCurrentCell] && !_dataGridViewOper[OperationInDispose]) {