Solved

Question about radiobuttons

Posted on 2012-03-20
2
173 Views
Last Modified: 2012-06-21
Hi,

I use VS2010 and I programm in c#.

On my form I have 2 radiobuttons called "Ascending" and "Descending".
The radiobutton Descending is checked so its default. What I would like
is when the user presses the radiobutton Ascending the boolean named
grdSort is set to false in the Settings.Settings. And offcaurse if the user
presses the radiobutton Descending the boolean must set to True.

How can I do that?

Who knows the answer and is willing to help me?

Peter Kiers
0
Comment
Question by:peterkiers
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 37741164
add event handlers for both radio buttons:

this.Ascending.CheckedChanged += new System.EventHandler(this.Ascending_CheckedChanged);

this.Descending.CheckedChanged += new System.EventHandler(this.Descending_CheckedChanged);

private void Ascending_CheckedChanged(object sender, EventArgs e)
        {
            grdSort = Ascending.Checked;
        }

        private void Descending_CheckedChanged(object sender, EventArgs e)
        {
            grdSort = Descending.Checked;
        }

Open in new window

0
 
LVL 1

Author Comment

by:peterkiers
ID: 37741180
Thanks.

Peter
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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