Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

When I am updating cell value in a datagridview it is not updating regularly.One

of the control in my datagrid is checkbox.When I uncheck the checkbox and when I debug

the event CellValueclick it is getting correct cell value(That is true).Immediate after

without clicking any other checkbox when I click that same checbox it is not getting the

correct value but getting the same value as before(That is true as before.But the checkbox is showing unchecked).But after

clicking any of the other check box and if I am clicking that checkbox again it is getting

the correct value.Please help me

Thanks in advance
Posted
Updated 4-Mar-12 20:58pm
v2
Comments
Varun Sareen 5-Mar-12 7:51am    
Please post some code
Perić Željko 6-Mar-12 3:33am    
Hello,

I had a similar problem. I guess that is because the check box is inside the cell as a content ( or a value ) of the cell. So if you click outside of check box it will result not as cell value click event but cell clicked event and the value of the variable that represents value of check box in code do not gets new value. So I solved the problem by handeling the both events for updating the values of variables in the program and forced the new value of check box in data grid view, so there is no mistake after user make click on data grid view check box cell.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900