Solved

Question about radiobuttons

Posted on 2012-03-20
2
172 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connection String 16 61
Advice on Xojo as a development tool over VB. 4 57
Not seen Link button 5 40
Visual Studio 2013 and Eclipse Neon 6 38
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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