Obj Ref exception when unchecking datagridview checkboxcell

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!


I can consistently get an object reference error when unchecking a checkbox in a datagridview.  I have set some breakpoints based on the stack trace, and the error seems to be that inside of DataGridView.CommitEditInternal(object), the CurrentCell property is NULL and no check is done on line 5771 to ensure that var cell is not null before calling GetInheritedStyle(…);  See attached screenshots.

I cannot recreate this in a sample app, or on other DGVs.  Just one DGV in our system seems to have this problem, I’m hoping you can help me figure out what the issue is.  I am running 1.3.65.

Thank you,

  • You must to post comments

Thanks Andrew,

we will investigate that issue (logged as WJ-7268).

Best regards

  • You must to post comments

I may have found the answer.  By adding this line of code in DataGridView.ProcessCellPointerWebEvents(…) at line 7368

SetCurrentCellAddressCore(colIndex, rowIndex, false, false, true);

Now the current cell  is set on a DGV uncheck (“gridCellMouseDown”) as well as on a DGV check (“focusCellChanged”)

  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json mixin.theme