Hi,
You need to check whether the currentCell is a CheckBoxCell first. If not,don't commit edit.
For example:
void dataGridView1_CurrentCellDirtyStateChanged(object sender, EventArgs e)
{
if (dataGridView1.CurrentCell is DataGridViewCheckBoxCell)
{
Console.WriteLine("CurrentCell is a DataGridViewCheckBoxCell");
}
}
Please let me know if this helps. If i misunderstood you, please feel free to tell me.
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.