Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to BindingData to RadioButton

How to BindingData to RadioButton

Scheduled Pinned Locked Moved Visual Basic
databasesql-serverwpfwcfsysadmin
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kindman_nb
    wrote on last edited by
    #1

    the problem is I'm designing a dataform which is liked with sql server 2000 table , on the table i have tree or more choices and I want the user to choose only one of them , i use for it a group of RadioButton but i can't binding it to the database how can i Binding data to the radiobutton , thanks for all

    jooooo

    K 1 Reply Last reply
    0
    • K kindman_nb

      the problem is I'm designing a dataform which is liked with sql server 2000 table , on the table i have tree or more choices and I want the user to choose only one of them , i use for it a group of RadioButton but i can't binding it to the database how can i Binding data to the radiobutton , thanks for all

      jooooo

      K Offline
      K Offline
      kindman_nb
      wrote on last edited by
      #2

      hi my working now is stopped , any one try to help me , or give me a we :sigh::sigh::sigh:

      jooooo

      K 1 Reply Last reply
      0
      • K kindman_nb

        hi my working now is stopped , any one try to help me , or give me a we :sigh::sigh::sigh:

        jooooo

        K Offline
        K Offline
        Kevin Nicol
        wrote on last edited by
        #3

        I don't think anyone can understand the Question, what is you want to bind the Radio buttons to? Do you want the radio button text to come from the Database? Or the useres selection be logged in the database?

        K 1 Reply Last reply
        0
        • K Kevin Nicol

          I don't think anyone can understand the Question, what is you want to bind the Radio buttons to? Do you want the radio button text to come from the Database? Or the useres selection be logged in the database?

          K Offline
          K Offline
          kindman_nb
          wrote on last edited by
          #4

          Thanks my friend i mean bind the Radio buttons to the useres selection to be logged in the database not the text of it i wait you

          jooooo

          K 1 Reply Last reply
          0
          • K kindman_nb

            Thanks my friend i mean bind the Radio buttons to the useres selection to be logged in the database not the text of it i wait you

            jooooo

            K Offline
            K Offline
            Kevin Nicol
            wrote on last edited by
            #5

            I don't think Binding the radio buttons to a database is even possible in that manner, and if it is I don't think its the right way to go about it. What you would probably want to do is handle the RadioButton.CheckChaged Event and then do an insert or update statement using a SLQDataAdapter or SQLCommand. Kevin

            K 1 Reply Last reply
            0
            • K Kevin Nicol

              I don't think Binding the radio buttons to a database is even possible in that manner, and if it is I don't think its the right way to go about it. What you would probably want to do is handle the RadioButton.CheckChaged Event and then do an insert or update statement using a SLQDataAdapter or SQLCommand. Kevin

              K Offline
              K Offline
              kindman_nb
              wrote on last edited by
              #6

              Thanks Kevin I use the Radio button to binding to field on the table for ex : on the table the user will choose between three cases , the method of Stock evaluation : choose on 1- FIFO 2- LIFO 3- Cost Average I want to make the three choice as Radio button and binding it to the tree fields on database i'm waiting your reply eagly :rose:

              jooooo

              K 1 Reply Last reply
              0
              • K kindman_nb

                Thanks Kevin I use the Radio button to binding to field on the table for ex : on the table the user will choose between three cases , the method of Stock evaluation : choose on 1- FIFO 2- LIFO 3- Cost Average I want to make the three choice as Radio button and binding it to the tree fields on database i'm waiting your reply eagly :rose:

                jooooo

                K Offline
                K Offline
                Kevin Nicol
                wrote on last edited by
                #7

                That was pretty vague but if I understand correctly there are 3 fields in a table in the database, and you want to use the radio buttons to choose which field to select from? dim Field as string IF rdb1.checked THEN field = 'field name else if rdb2.checked THEN field = 'field name 2 else field = 'field name 3 end if Thas pretty bad programing style but for purpose of explination it will suffice Now you perform the select statement SomeAdapter.SelectCommand.CommandText = "SELECT " & Field & " FROM some table WHERE somecontraints hope that helps

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups