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. Databinding Question

Databinding Question

Scheduled Pinned Locked Moved Visual Basic
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.
  • M Offline
    M Offline
    mr_lasseter
    wrote on last edited by
    #1

    I have two combo boxes that have a parent child relationship. So when comboA changes comboB uses a new DataSource and the drop down values are updated. This works correctly, but now I am databinding the selectedvalues of each combo box to an object. Sometimes the databinding works correctly, meaning comboA is bound first then comboB updates with a new list and comboB's value is bound correctly. Sometimes comboB is bound before A which causes B to be empty after A populates itself. How do you control the order in which values are bound to their controls? I have tried changing the order of the combo boxes on the form, but no luck. Anyone have any ideas? Thanks

    Mike Lasseter

    C 1 Reply Last reply
    0
    • M mr_lasseter

      I have two combo boxes that have a parent child relationship. So when comboA changes comboB uses a new DataSource and the drop down values are updated. This works correctly, but now I am databinding the selectedvalues of each combo box to an object. Sometimes the databinding works correctly, meaning comboA is bound first then comboB updates with a new list and comboB's value is bound correctly. Sometimes comboB is bound before A which causes B to be empty after A populates itself. How do you control the order in which values are bound to their controls? I have tried changing the order of the combo boxes on the form, but no luck. Anyone have any ideas? Thanks

      Mike Lasseter

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      mr_lasseter wrote:

      How do you control the order in which values are bound to their controls?

      By doing it in code instead of via the designer.

      M 1 Reply Last reply
      0
      • C Christian Graus

        mr_lasseter wrote:

        How do you control the order in which values are bound to their controls?

        By doing it in code instead of via the designer.

        M Offline
        M Offline
        mr_lasseter
        wrote on last edited by
        #3

        Yeah, that's what I ended up doing, but no control through the designer?

        Mike Lasseter

        C 1 Reply Last reply
        0
        • M mr_lasseter

          Yeah, that's what I ended up doing, but no control through the designer?

          Mike Lasseter

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I wouldn't expect so.  The designer will always be a set of shortcuts for people who prefer not to have to write code.  It can never be as flexible as actual programming.

          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