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. SelectedValue of Combox Not saved in the table

SelectedValue of Combox Not saved in the table

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

    Hi In my data entry form, all the fields are bound to a tblStaff table through BindingSource (_staffInfoB_S). One of these controls is a cboGender ComboBox. I am manually populating the cboGender with only two items -- "Male" and "Female" and trying the SelectedValue to be saved in the underlying table, using the following code:

    cboGender.Items.Add("Male")
    cboGender.Items.Add("Female")
    Dim bndg As New System.Windows.Forms.Binding _
    ("SelectedValue", StaffInfoBindingSource, "Gender", True)
    cboGender.DataBindings.Add(bndg)

    But, it doesn't save the SelectedValue in the underlying table. Looking for a suggestion, please!

    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