Reputation: 27
I have 4 radioButtons on my form. When I checked 1 radioButton others become unchecked. How to bind radioButton1 with radioButton2 and radioButton3 with radioButton4 to check radioButton1, radioButton2 is off and .....
Upvotes: 0
Views: 99
Reputation: 2758
The reason only one is remaining checked is because they are all on the same form (Radio buttons are designed so that the user can only select one in a group). If you want radiobutton1
to become unchecked when radiobutton2
is checked, and vice versa, and also you also want the same thing to happen with radiobutton3
and radiobutton4
, then put radiobuttons 1 and 2 in a groupbox or panel or a different container
, and put radiobutton
3 and 4 in a separate container from 1 and 2
.
Note: You could also look at checkboxes
which the user can select regardless whether any other are checked, unless programmed otherwise.
Upvotes: 2
Reputation: 14430
Put your RadioButton1 and RadioButton2 in one Groupbox and Radiobutton3 and Radiobutton4 in another group box.
Upvotes: 0