The VB.NET RadioButton control allows you to choose one item within the parent control or group of items. When a user selects one option within a group of options the other options clear automatically. Typically the options are on the line of Yes/No, Male/Female, True/False etc. The RadioButton is very similiar to the CheckBox control. The main difference is with the CheckBox control, the user can select multiple choices within the same group of options.
Private Sub rbAll_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbAll.CheckedChanged
UpdateRb()
End Sub
Private Sub rbPosted_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbPosted.CheckedChanged
UpdateRb()
End Sub
Private Sub rbNotPosted_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbNotPosted.CheckedChanged
UpdateRb()
End Sub
Public Sub UpdateRb()
If rbAll.Checked = True Then
rbNotPosted.Checked = False
rbPosted.Checked = False
ElseIf rbNotPosted.Checked = True Then
rbAll.Checked = False
rbPosted.Checked = False
ElseIf rbPosted.Checked = True Then
rbAll.Checked = False
rbNotPosted.Checked = False
End If
Hello,
ReplyDeletethis is great article !!! thanks for sharing with us.
check this link...
http://mindstick.com/Articles/df3f2179-045d-4673-a5ed-1598cfe6ce2e/?RadioButton%20Control%20in%20VB.Net
It's might be useful for you.
Thanks !!!!