How to show controls dynamically

Posted on 2011-10-13
Last Modified: 2013-12-16

I have created a form which contains in top two radiobuttons. Under these radiobuttons I have a groupbox.
I need to do so that for each selected radiobutton the controls within a groupbox will be different.
Please, see attached ilustration.

how to do this and what's the correct way of creating such content sensitive controls?

Question by:Zaurb
    LVL 39

    Expert Comment

    by:Kyle Abrahams
    Create a panel (where the red line is)

    On the RadioButtons Selected Index Changed, set the panel visibility to true or false.
    LVL 39

    Accepted Solution

    You can also have multiple panels over each other . . . so create 2 different panels (one for each radio button), then set that specific panel visible to true and the other false.

    If you're going to be having a lot of these you can look at dynamically adding controls.
    LVL 1

    Author Closing Comment

    Thank you!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now