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. Editing ComboBox with DataSource

Editing ComboBox with DataSource

Scheduled Pinned Locked Moved C#
databasequestion
1 Posts 1 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.
  • P Offline
    P Offline
    polishprogrammer
    wrote on last edited by
    #1

    I have a database that has one table (let's call it Cyl) that has several fields "linked" to other reference tables. The associated database editing application allows the user to enter new records for through a combination of textboxes and comboboxes. The comboboxes have as their datasource the linked tables. So, the user can select an item for the new record from a pre-set list of items stored in one of the other tables. The "linked" comboboxes are databound to the source datatable (Cyl) on the SelectedValue property and their datasource and value member are the linked tables values. This works well unless the user needs to input data for a field in the Cyl table that is not currently present in one of the linked tables (let's say a Cust table). In that case, I can get the software to save the Cust field data even if the entry for the Cust field is not in the related Cust table, but the data does not display correctly on the form because the Cust field in the Cyl table is bound to the SelectedValue of the Cust combobox and if the entry for the Cust field is not represented in the Cust table, there is no value in Cust combobox. So, basically what I need is to have the a field from one table, say the Cust table, loaded into a combobox that users will use to enter data for a field in another table while still allowing the user to enter data that is not in the Cust table. I hope this question makes sense. Thanks.

    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