Ey!!
Thanks Peter for your attention.
Well, It's been quite complicated this. What I actually need is everytime I
check on the checkbox, to do a validation (comparing the value of a column
between rows selected), and after that if the validation is correct then
leave the checkbox checked. If the validation is incorrect then uncheck the
checkbox.
I tried with the event CurrentCellDirtyStateChange, doing the commit of the
edition here everytime IsCurrentCellDirty is in false. But its being still
difficult getting back to the previous state, when the checkbox were
unchecked.
I even tried this code which is supposed to capture SelectedIndexChanged for
a combobox. Well I thought it would work if i adapted it to a CheckBox:
private void dataGridView1_EditingControlShowing(object sender,
DataGridViewEditingControlShowingEventArgs e)
{
CheckBox cb = e.Control as CheckBox;
if (cb != null)
{
cb.CheckedChanged-= new
EventHandler(cb_CheckedChanged);
cb.CheckedChanged+= new
EventHandler(cb_CheckedChanged);
}
}
void cb_CheckedChanged(object sender, EventArgs e)
{
MessageBox.Show("Selected index changed");
}
But nop, it didnt work well.
I don't really know what to do.
Thanks again,
Carolina