I'll try keep this as simple as possible.
I have on form1, Checkbox1 (Cat) & Checkbox2 (Dog) under the header label called 'selection'
Within the form, i have the following code;
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
table.Columns.Add("Selection", Type.GetType("System.String"))
End Sub
My question is, if the user selects 'Dog' (checkbox2), is there a way to insert this title text into a single column row stating 'dog' based on the choice ticked?
Within a button, the following code would be applied to populate the datagridview
table.Rows.Add(Checkbox1.Text)
Otherwise do i have to create a row or each checkbox?
Aucun commentaire:
Enregistrer un commentaire