We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

FAQ item 5.76

I've found a couple of problems with FAQ item 5.76, "How can I get a CheckBox column in a DataGrid to react to the first click?" The solution gives the following error message if the mouse is clicked on one row and the pointer is moved to another column before it's released: The ListManager's position must be equal to rowNum. Parameter name: rowNum Do you want to correct the value? Also, the following error occurs if clicking outside any columns: An unhandled exception of type 'System.IndexOutOfRangeException'occurred in system.windows.forms.dll. Additional information: Index was outside the bounds of the array. I got it working by adding the following code after the line that initializes hti: if (hti.Row == -1 || hti.Column == -1 || hti.Row != dg.CurrentCell.RowNumber) return; Thanks, Roger Dahl

Live Chat Icon For mobile
Up arrow icon