Cannot check/uncheck DataGridViewCheckBoxCell?

  • Thread starter Thread starter zlf
  • Start date Start date
Z

zlf

Hi,
After setting DataGridViewCheckBoxColumn's TrueValue and FalseValue, I found
I assign either TrueValue or FalseValue to a DataGridViewCheckBoxCell, it
will be checked. What is the problem? How can I control its status like
CheckBox#Checked? Thx
 
Set the properties of datagridviewcheckboxcell

TrueValue = 1;
FalseValue = 0;

To check / uncheck the checkbox cell:

DataGridView1.Rows[rowIndex].Cells[colName].Value = 0 //uncheck

DataGridView1.Rows[rowIndex].Cells[colName].Value = 1 //check
 
Back
Top