Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7039265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:46:35+00:00 2026-05-28T01:46:35+00:00

I have a group box which has some radio buttons. I am trying to

  • 0

I have a group box which has some radio buttons. I am trying to implement serialization with the help of a tutorial from Code Project. That tutorial supports serialization of checkboxes and not radio buttons. So i need to make the radio buttons in my app as checkboxes (that is they should be check boxes but work like a radiobutton).

I tried writing code, but what happens is when I find that a particular checkbox is checked and I go to uncheck or vice versa, it triggers that checked_changed event handler and this goes into an infinite loop.

Can someone help me out with this?

Thanks

UPDATE:

After seeing your replies, I would like to say thanks a lot. Yes, You are all right that we should not be messing with the basic properties. I will work with changing the serialization method.

P.S The link for the tutorial is http://www.codeproject.com/KB/dialog/SavingTheStateOfAForm.aspx

Final Update:

After following the replies posted here, I decided not to change the default properties but to change the serializer code. I did that and it now works perfectly. Thanks a lot, everyone.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:46:36+00:00Added an answer on May 28, 2026 at 1:46 am

    I agree with all the commenters: do not make checkboxes that act like radio buttons, it flies in the face of UI conventions and confuses users.

    The right way to do this is to fix your code to serialize the radio buttons, but without seeing your code it’s hard to know how to help you. For a start, you can fix the CheckedChanged looping by temporarily removing the event handler before you do anything. For example:

    myCheckBox.CheckedChanged -= MyCheckedChangedEventHandler;
    myCheckBox.Checked = true;
    myCheckBox.CheckedChanged += MyCheckedChangedEventHandler;
    

    If this alone doesn’t fix your issue, please show us your code and we’ll try to help more.

    Edit: Based on the tutorial listed in your update, I’m guessing the problem happens when you call FormSerialisor.Deserialise(), which triggers your controls’ event handlers to fire? If that’s the case, the quick fix is to just do what I mentioned: remove the radio button event handlers before calling FormSerialisor.Deserialise() and then re-add them afterwards. Example:

    myRadioButton.CheckedChanged -= MyCheckedChangedEventHandler;
    FormSerialisor.Deserialise(this, mySerialisepath);
    myRadioButton.CheckedChanged += MyCheckedChangedEventHandler;
    

    You may also need to edit the FormSerialisor class to handle RadioButtons; just copy the code that handles checkboxes but change all the references to RadioButton. It’s not clear from your question whether this step will be necessary or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some group of check box of which user has to select atleast
I have a group of three radio buttons. Depending on which radio button is
I have a group of radio buttons in my Swing application that have a
I have a web based program which chooses some records from a database using
I have a Box, which has many Compartments which contain many Items which belong
I am trying to add a new radio button to an existing group box
Basically i am trying to create a programme, which needs to have some authorisation.
I have a text box(txt_to) which has values seperated by ; How can I
I have a rest service which has a list of Groups each group has
I have a Booking which has a list of TourGuides and I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.