missing group property in visual studio

Posted on 2011-10-05
Medium Priority
Last Modified: 2013-12-16
i cannot locate the group property setting for a radio button in visual c
Question by:BushBill
  • 2
LVL 40
ID: 36917864
There is nothing such as a group property setting, so I am not sure what you are trying to do here.

RadioButtons in .NET do not work the same way as they do in other environments such as Microsoft Access.

They can be used in many different containers, so the notion of a group does not exist. If they are in a GroupBox, you can reference the GroupBox itself with:

Open in new window

From the GroupBox, if you want to know which button is checked, you would use code like this one:
For Each Button As RadioButton In GroupBox1.Controls
   If Button.Checked Then
      MessageBox.Show(Button.Text & " is activated")
      Exit For
   End If

Open in new window


Author Comment

ID: 36918397
I want the radio buttons to be checked independently of each other. MSDN documentation saya that behavior requires the Group property of the first radio button to be false. I cannot locate this property.
LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36918449
In what environment are you? It is important to specify it or to select a zone that indicates it when you post questions. It is also important that you do so also when you lookup information in the documentation.

I was assuming that you were developing a Windows Application. In such environment, there is no Group property.

RadioButtons in an ASP or WPF application would behave differently.

I would also question the idea of using RadioButtons that can be checked independently from each other. This will mislead the user. This type of operation is usually done with CheckBoxes, not RadioButtons. A user that checks one of your RadioButtons and won't see the other being automatically checked off will wonder what is happening.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question