[RESOLVED] Radio buttons not working right???
I have a VB.Net 2005 application in which I have a form that contains 2 sets of Radio buttons (2 Radio Buttons per set). A screenshot of the form is attached.
The values of these RDO's are "Yes" and "No" for each set. Each RDO is named separately. For the 1st set, I click either "Yes" or "No", however, when I click on the 2nd set...the value for the 1st set is removed. The object is that both sets contain either a "Yes" or "No" value. I set the values in the Click Event of each control. What am I doing wrong?
Thanks,
Re: Radio buttons not working right???
you need to put each set into a different container, like a Group Box or a panel...
-tg
Re: Radio buttons not working right???
Place each group of radio buttons in it's own container, like a GroupBox, or a panel.
EDIT: Dammit TG, I'm just too slow. ;)
Re: Radio buttons not working right???
I'll give it a shot but why does it have to work that way? Just curious!
Re: Radio buttons not working right???
Because option buttons in the same container are considered to be a set, regardless of how many or how few there are. The only way to separate them is to use different containers. They were designed that way.
Re: Radio buttons not working right???
Ok,
I did that. Now, when I select one from each container, in that RDO's Click Event, I check the .Checked Property. If it's been selected, I assign a value to a variable, but for some reason the value isn't passed back to a grid (which contains a complete record). It was passing back a value before but now that it's in a container, it's not doing it.
Re: Radio buttons not working right???
Double check the event handler.... make sure the Handles.... is still there... if not, add it back in... when you cut controls off of a form (which I assume you did to get them onto the container)... it removes the handles clause, but doesn't put it back when you paste them back.
-tg