dcsimg
Results 1 to 5 of 5

Thread: Edit/Update and Radio Buttons

  1. #1
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115

    Edit/Update and Radio Buttons

    Guys,

    When using .dbEditUpdateFlds with radio buttons I can't get the radio buttons to reflect the records data.

    here's an example of my code:

    Dim eugFlds as string = ""

    eugFlds = "fi=ObligateSW|type=radio|val={{0-1}}|tex=Approvalx"

    .dbEditUpdateFlds=eugFlds

    What am I doing wrong?

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    sounds like your field data is boolean and you want to use "radio"? or should it be "checkbox" instead ?

    Frank

  3. #3
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    Thanks!

    The data type is MS SQL's "Bit". I changed from radio to checkbox and it works. Can you explain why this works with checkbox and not with radio. I'm having a hard time distinguishing between the two...

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    Paul,

    You can have many radios for a field like one,two,three.... but you can have only one checkbox for a field which is 1/0.
    In the checkbox, asp-db automatcally output the right type of boolean value for the field type. For radio, you have to put in exact type which is different for MS-SQL and Access and some others.



    Frank

  5. #5
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Frank,

    In this case I'm only using 2 radio buttons (yes/no)which is binary. In the Tornado manual I found that I needed to use the .dbBoolText parameters droptrue|dropfalse as well as displaytrue|displayfalse which when used corrected the problem.

    thanks for you help, Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •