Make the checkboxes in a DataGridViewCheckBoxColumn be checked

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Falkeli
    New Member
    • Feb 2012
    • 19

    Make the checkboxes in a DataGridViewCheckBoxColumn be checked

    I have tried to use the following code when adding a new row:
    Code:
    DataGridViewRow row = new DataGridViewRow();
    dataGridView1.Rows.Add(row);
    row.Cells[0].Value = true;
    //and more initialization
    I have tried replacing the word "true" with 1, after setting the TrueValue property of the column to 1. Neither the code above, nor the change described below, makes the checkboxes be checked. How do I make them be checked?
Working...