foreach (DataGridViewRow row in dataGridView2.Rows) { //datafridview cell[0] is textbox //datagridview cell[1] is checkbox //if datagridview cell[0] text is in listbox3 items if (row.Cells[0].Value == listBox3.Items) { //if item is in listbox3 then checkbox checked row.Cells[1].Value = true; } else { //if item is not in listbox3 then checkbox unchecked row.Cells[1].Value = false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)