dimanche 17 juillet 2022

DataGridView selected row to check a checkbox

I am currently trying to check a checkbox dependent of the SQL data after selecting the row in a datagridview.

I have gotten this to display text with TexBoxes, but cannot get it to check a check box.

Yes = True No = False

Any recommendations, would be very much appreciated.

                textBox4.Text = row.Cells[11].Value.ToString();  //other/notes
                textBox3.Text = row.Cells[3].Value.ToString();  //Monitor
                textBox1.Text = row.Cells[0].Value.ToString();  //Firstname
                textBox2.Text = row.Cells[1].Value.ToString();  //Surname
                comboBox1.Text = row.Cells[2].Value.ToString();  //Company
                comboBox3.Text = row.Cells[4].Value.ToString();  //Laptop/Nuc
                checkBox1. = row.Cells[5].Value.ToString();   //keyboard

enter image description here

enter code here



Aucun commentaire:

Enregistrer un commentaire