An exception pops up when pressing the space keyboard on the checkbox cell #12752
Open
Description
.NET version
.NET SDK 10.0.100-alpha.1.25058.38
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
This is not a regression issue, can reproduce all earlier releases of .NET versions (.NET 6.0/7.0/8.0/9.0) & .NET Framework
Issue description
An exception pops up when pressing the space keyboard on the checkbox cell
Steps to reproduce
- Clone the https://github.com/Zheng-Li01/winforms/tree/RepoApplication branch, and run the ScratchProject
- Tab to checkbox cell
- Press the space keyboard on the checkbox cell
- Observe the results
Call Stack:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.DataGridViewCheckBoxCell.NotifyMSAAClient(Int32 columnIndex, Int32 rowIndex) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs:line 1016
at System.Windows.Forms.DataGridViewCheckBoxCell.OnKeyUp(KeyEventArgs e, Int32 rowIndex) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs:line 884
at System.Windows.Forms.DataGridViewCell.OnKeyUpInternal(KeyEventArgs e, Int32 rowIndex) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs:line 2928
at System.Windows.Forms.DataGridView.OnKeyUp(KeyEventArgs e) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs:line 16177
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Control.cs:line 9160
at System.Windows.Forms.DataGridView.ProcessKeyEventArgs(Message& m) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs:line 22376
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Control.cs:line 9202
at System.Windows.Forms.Control.WndProc(Message& m) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\Control.cs:line 12626
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam) in Q:\source\winforms\src\System.Windows.Forms\src\System\Windows\Forms\NativeWindow.cs:line 349