Click here to Skip to main content
13,148,107 members (72,638 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello all,

I am using user settings to store the checked property of a control. The issue I have is: For example I have two radio buttons on my form. rb1 is checked by default, rb2 is unchecked by default. Now if I click rb2, the checked state of rb1 changes to uncheckedm but rb2 still remains unchecked, too. Only after I click rb2 again (NOT double click), the checked state of rb2 changes to checked.

This must have to do with the settings stuff, when the controls' properties are not bound to a setting they work as they should.

When I get the settings manually instead of "binding" them via the Designer, all is working fine:

rb1.Checked = Properties.Settings.Default.rb1;
            rb2.Checked = Properties.Settings.Default.rb2;

...shows normal behavior of the radio buttons.

So, what do I need to do to use the Designer to apply the settings but having the same result as by doing this manually?

More weird is that for most of the checkboxes I have on my form, this issue does not appear, but still for SOME of them; I can't see any difference in code or properties for those which work and those which don't.

I appreciate any hints and tipps,
Posted 2-Jan-13 0:29am
(unknown member)
Updated 2-Jan-13 1:19am
jibesh 2-Jan-13 7:25am
radio buttons default behavior is that only one of the rb is in checked state in a group. the best thing you can do is do not set all the rb to true/false instead select any one of the rb you want as true/false in a group.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170924.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100