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. C#
  4. how would you change your bindingsource for a textbox programmably

how would you change your bindingsource for a textbox programmably

Scheduled Pinned Locked Moved C#
question
4 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.
  • T Offline
    T Offline
    tonyonlinux
    wrote on last edited by
    #1

    if you wanted to change say textbox1 datasource to be that of checkbox1 datasource how would you go about doing that ? i looked for something like textbox1.datasource but didn't find anything. I know you can set it in properties but i wanted to set it in code if possible.. thanks

    G 1 Reply Last reply
    0
    • T tonyonlinux

      if you wanted to change say textbox1 datasource to be that of checkbox1 datasource how would you go about doing that ? i looked for something like textbox1.datasource but didn't find anything. I know you can set it in properties but i wanted to set it in code if possible.. thanks

      G Offline
      G Offline
      Gaurav Dudeja India
      wrote on last edited by
      #2

      what do you mean by binding a textbox with datasource, you can simpley write textbox.text for binding any value in that.

      T 1 Reply Last reply
      0
      • G Gaurav Dudeja India

        what do you mean by binding a textbox with datasource, you can simpley write textbox.text for binding any value in that.

        T Offline
        T Offline
        tonyonlinux
        wrote on last edited by
        #3

        well my original idea was that the reason one of my control was not populating correctly was because it was bound to a different binding source but I don't think that is problem at all. i used textbox.databinding.add("Text",bindingnavigator.bindingsource,"SurrogateNumber"); then of course i get double binding errors when I do that because it is already bound. I don't know I'll figure something out. Kinda strange that the data comes back but that one control only gets the first instance of the filter whenever all the data is there. Thanks for trying to help though.

        T 1 Reply Last reply
        0
        • T tonyonlinux

          well my original idea was that the reason one of my control was not populating correctly was because it was bound to a different binding source but I don't think that is problem at all. i used textbox.databinding.add("Text",bindingnavigator.bindingsource,"SurrogateNumber"); then of course i get double binding errors when I do that because it is already bound. I don't know I'll figure something out. Kinda strange that the data comes back but that one control only gets the first instance of the filter whenever all the data is there. Thanks for trying to help though.

          T Offline
          T Offline
          tonyonlinux
          wrote on last edited by
          #4

          I figured it out i had to use dataloadoptions to link all the tables together and it works fine.

          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