I have a grid view that has a check box column, and I want to trigger a drawing event as soon as the value of the cell is toggled. I tried the ValueChaged and the CellEndEdit and BeginEdit, and chose the selection mode as CellSelect. As for the the first 2 events, the event was triggered upon the finishing of the edit mode, like moving out of the current cell, or going back and forth. It's just a weird behavior.
Is there anything that triggers the event on the grid view as soon as the cell value is changed?
Small update.... Make sure you use
EditedFormattedValue
instead ofvalue
as I triedvalue
but it never give right status that is checked/unchecked most of the site still usevalue
but as used in latest c# 2010 express below is one way to access..Also
_CellValueChanged
event suggested or used by few must be usable for some cases but if you are looking for every check/uncheck of cell make sure you use_CellContentClick
else per my notice I see not every time_CellValueChanged
is fired.. that is if the same checkbox is clicked over & over again it does not fire_CellValueChanged
but if you click alternately for example you have two chekbox & click one after other_CellValueChanged
event will be fired but usually if looking for event to fire everytime the any cell is check/uncheck_CellValueChanged
is not fired.cellEndEditTimer.Start();
this line makes the datagridview update the list of checked boxes
Thank you.
I finally implemented it this way