Hi,
I had to improvise a control that looks like a list view with each row
holding 3 radio buttons. To do this I am using a panel (mainPanel)
that holds other panels representing rows (rowPanel).
So, I fetch database and for each item, I add a rowPenel with 3 radio
buttons to the mainPanel.
Now, for each row, there must be one radio button selected. To check
that, I do:
For i = 0 To mainPanel.Controls.Count - 1
Dim rowPanel as Panel = mainPanel.Controls.item(i)
Dim aRadioButton as RadioButton
For Each aRadioButton in rowPanel.Controls
If aRadioButton.Checked = True Then
blnFound = True
End If
End For
If blnFound = False Then
ErrorMessage()
End If
End For
The problem is that even though I check a radio button, blnFound will
be still false. Can somebody tell what I am doing wrong?
Thank you