mercredi 10 juillet 2019

How do you make a column in the datagridview that is a checkbox populate a checkbox on an update form?

So one of my tables in the database im using has a few different checkbox columns that are information about the customer. Like one is if they are foreign or not or like a few yes or no questions. I made my form that has a bunch of text boxes that will populate themselves when you select a record.

I need the checkboxes to also populate but I do not know the syntax

Ive tried looking up the solution but everything i found is about selecting a record by using a checkbox not getting a checkbox to fill itself in if its checked or not on the table itself.

The code im using for the textboxes is an row index methods that uses this to populate the normal textboxes

txtboxFirstName.Text = row.Cells["FirstName"].Value.ToString();

txtboxLastName.Text = row.Cells["LastName"].Value.ToString();

for the checkbox I would imagine its something like ckboxForeignCust.Checked = row.Cells["ForesignCust"]..... but i do not know how to finish that line of code.

Any suggestions?




Aucun commentaire:

Enregistrer un commentaire