I have a datagridview with two checkboxes and one label. The datagridview is unbound.
When the user checks on a checkbox, I want the box to be checked or unchecked as appropriate. Also, when a use clicks on the label, I want to be able to check the second check box.
I've tried to just check the status of the checkboxes after the user has clicked on them, but I always get the status as unchecked.
I've also tried to add code to check/uncheck them myself, but I have not been able to get the working either.
Here is some sample code:
this.cameraList.BeginEdit(true);
this.cameraList.Rows[e.RowIndex].Cells[index].Value = CheckState.Unchecked;
this.cameraList.CurrentCell = cameraList[2, e.RowIndex];
this.cameraList.EndEdit()
But even after executing this, the checkbox remains checked.
It seems to work if I click on the label, the boxes will check and uncheck. But if I click on the checkboxes themselves it does not work.
Anyway, I am getting frustrated with the whole thing. Any help would be greatly appreciated.