jeudi 5 février 2015

How to cancel a checkbox in a DataGridView from being checked

I have a datagridview that is databound. How can I cancel the checkbox being checked in the datagridview if some condition is not met?



private void dataGridViewStu_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
dataGridViewStu.CommitEdit(DataGridViewDataErrorContexts.Commit);
}

private void dataGridViewStu_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
}




Aucun commentaire:

Enregistrer un commentaire