mardi 7 juillet 2015

The selected row in datagridview checks off the checkbox if the cell contains a text in VB.net

I have a form that adds information from the textbox and checkbox to the datagridview. The datagridview only has 2 columns firstname and member column.

I want the application to checkmark the checkbox which is located outside of the datagridview if the selected row has the text "member" in it in the second column. And un-checkmark the checkbox if the selected row has nothing in the member column

So far I got this which displays the first name in the text box, but does not check mark the checkbox if the row contains a text.

If e.RowIndex >= 0 Then

  Dim row As DataGridViewRow
  row = Me.DataGridView1.Rows(e.RowIndex)

  FirstNametxt.Text = row.Cells("Column1").Value.ToString
End If




Aucun commentaire:

Enregistrer un commentaire