locked
radiobuttons issue RRS feed

  • Question

  • i ve got two radiobuttons one labelled male and the other labelled female and a client is supposed to choose which gender they are and insert it into the other database along with other information. I want to know how I can insert the chosen value (male or female) into the database

    If you think it you can achieve it

    Wednesday, March 7, 2012 10:23 AM

Answers

  • Hi Tendairmaire, 

    If there is for you a situation that an object can be male,  female or something else, you need two properties (items, columns). Otherwise you can use one property, for instance IsMale. 

    If you put your two buttons then in a groupbox you only have to bind one in the case of ISMale that one to the MaleRadioButton. If a button is then set to Male, the one from Female becomes automatically false. Because of the binding the same is than with the IsMale property.

     


    Success
    Cor


    • Edited by Cor Ligthert Wednesday, March 7, 2012 10:34 AM
    • Marked as answer by Youen Zen Thursday, March 15, 2012 3:38 AM
    Wednesday, March 7, 2012 10:33 AM
    • Marked as answer by Youen Zen Thursday, March 15, 2012 3:38 AM
    Wednesday, March 7, 2012 1:08 PM

All replies

  • Hi Tendairmaire, 

    If there is for you a situation that an object can be male,  female or something else, you need two properties (items, columns). Otherwise you can use one property, for instance IsMale. 

    If you put your two buttons then in a groupbox you only have to bind one in the case of ISMale that one to the MaleRadioButton. If a button is then set to Male, the one from Female becomes automatically false. Because of the binding the same is than with the IsMale property.

     


    Success
    Cor


    • Edited by Cor Ligthert Wednesday, March 7, 2012 10:34 AM
    • Marked as answer by Youen Zen Thursday, March 15, 2012 3:38 AM
    Wednesday, March 7, 2012 10:33 AM
    • Marked as answer by Youen Zen Thursday, March 15, 2012 3:38 AM
    Wednesday, March 7, 2012 1:08 PM