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. A problem with DataBinding. [modified]

A problem with DataBinding. [modified]

Scheduled Pinned Locked Moved C#
help
3 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.
  • A Offline
    A Offline
    AxiliuM
    wrote on last edited by
    #1

    I have 2 tables >>Tb_orders (date, ... , id_cust1, id_cust2) >>Tb_customers(id_cust, name ...) and I need to edit the fields id_cust1, id_cust2 using ComboBox

    cBox1.DataSource = Tb_customers;
    cBox1.DisplayMember = "name";
    cBox1.ValueMember = "id_cust";
    cBox1.DataBindings.Add("SelectedValue", Tb_orders, "id_cust1");
    cBox2.DataSource = Tb_customers;
    cBox2.DisplayMember = "name";
    cBox2.ValueMember = "id_cust";
    cBox2.DataBindings.Add("SelectedValue", Tb_orders, "id_cust2");

    everything is clear but cBox1 and cBox2 have the same value. I dont know what I have to do..

    modified on Saturday, January 31, 2009 2:03 AM

    M 1 Reply Last reply
    0
    • A AxiliuM

      I have 2 tables >>Tb_orders (date, ... , id_cust1, id_cust2) >>Tb_customers(id_cust, name ...) and I need to edit the fields id_cust1, id_cust2 using ComboBox

      cBox1.DataSource = Tb_customers;
      cBox1.DisplayMember = "name";
      cBox1.ValueMember = "id_cust";
      cBox1.DataBindings.Add("SelectedValue", Tb_orders, "id_cust1");
      cBox2.DataSource = Tb_customers;
      cBox2.DisplayMember = "name";
      cBox2.ValueMember = "id_cust";
      cBox2.DataBindings.Add("SelectedValue", Tb_orders, "id_cust2");

      everything is clear but cBox1 and cBox2 have the same value. I dont know what I have to do..

      modified on Saturday, January 31, 2009 2:03 AM

      M Offline
      M Offline
      MadArtSoft
      wrote on last edited by
      #2

      Try to use diffrent data source. I mean create separate Data source object.

      C# controls, .Net components. Help Desk Software

      A 1 Reply Last reply
      0
      • M MadArtSoft

        Try to use diffrent data source. I mean create separate Data source object.

        C# controls, .Net components. Help Desk Software

        A Offline
        A Offline
        AxiliuM
        wrote on last edited by
        #3

        Thank you! :)

        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