For some of the rows, I want the check box to default with the Check in the checkbox.
//Name = elements[1] + "," + elements[2];
//textBox1.Text = Name;
dataGridView1.AutoGenerateColumns = false;
dataGridView1.ColumnCount = 7;
dataGridView1.Columns[0].Name = "Lab Order Number";
dataGridView1.Columns[1].Name = "Test Date ";
dataGridView1.Columns[2].Name = "Doctor ";
dataGridView1.Columns[3].Name = "Facility ";
dataGridView1.Columns[4].Name = "Status ";
dataGridView1.Columns[5].Name = "Tests";
DataGridViewCheckBoxColumn myCheckedColumn = new DataGridViewCheckBoxColumn()
{
Name = "Reviewed Report",
FalseValue = 0,
TrueValue = 1,
Visible = true
};
// add the new column to your dataGridView
dataGridView1.Columns.Add(myCheckedColumn);
If this was regular check box, I would be able to simply state myCheckColumn.Checked = true.
However there is no Check property for a check box generated with the DataGridViewCheckBoxColumn class.
Can someone please tell me how to do this?
Thank you.