How to pass value from DataGridView to RadioButton
How can I pass a value from a DataGridView to a radio button in VB.Net? I have tried the following code but it is not working:
If DataGridView1.Rows(e.RowIndex).Cells(2).Value.ToString.Equals("A") Then
RadioButton1.Checked = True
ElseIf DataGridView1.Rows(e.RowIndex).Cells(2).Value.ToString.Equals("B") Then
RadioButton2.Checked = True
End If