Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have a DataGridView control containing several columns one of which is a CheckBoxColumn. Clicking any of the CheckBoxes in this column fires the CellContentClick event which perfoms a task using the value of the clicked CheckBox. However, the value of the CheckBox doesn't seem to update until the cell loses focus, which is a problem for the task I am trying to achieve.

Anybody help me on this one? Thanks.

EDIT : Sorted it I think using the CommitEdit method of the grid.

modified on Wednesday, August 5, 2009 7:46 AM
Posted

1 solution

In the CellContentClick event, you will get the updated value in the EditedFormattedValue property of the cell and not in the Value property.

 
Share this answer
 


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