Solved

Question about radiobuttons

Posted on 2012-03-20
2
168 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
Comment Utility
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
Comment Utility
Thanks.

Peter
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

13 Experts available now in Live!

Get 1:1 Help Now