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. Combo Box.ValueMember Problem

Combo Box.ValueMember Problem

Scheduled Pinned Locked Moved C#
helpdatabase
4 Posts 3 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.
  • S Offline
    S Offline
    sajid salim khan
    wrote on last edited by
    #1

    the problem is in form load event i kept the filling of the combobox named Gender from SQL tables it is giving error in the following line this.cGender.valuemember = "GenID"; (the value not found blah blah) why it is doing so sas

    L P 2 Replies Last reply
    0
    • S sajid salim khan

      the problem is in form load event i kept the filling of the combobox named Gender from SQL tables it is giving error in the following line this.cGender.valuemember = "GenID"; (the value not found blah blah) why it is doing so sas

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      sajid.salim.khan wrote:

      in form load event i kept the filling of the combobox named Gender from SQL tables

      Is there some reason you are not using data binding?

      1 Reply Last reply
      0
      • S sajid salim khan

        the problem is in form load event i kept the filling of the combobox named Gender from SQL tables it is giving error in the following line this.cGender.valuemember = "GenID"; (the value not found blah blah) why it is doing so sas

        P Offline
        P Offline
        pmarfleet
        wrote on last edited by
        #3

        sajid.salim.khan wrote:

        the value not found blah blah

        Hmm, interesting error message. Not seen that one before :suss:.

        sajid.salim.khan wrote:

        this.cGender.valuemember = "GenID";

        Does the data source you are binding to contain a field called 'GenID'?

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        S 1 Reply Last reply
        0
        • P pmarfleet

          sajid.salim.khan wrote:

          the value not found blah blah

          Hmm, interesting error message. Not seen that one before :suss:.

          sajid.salim.khan wrote:

          this.cGender.valuemember = "GenID";

          Does the data source you are binding to contain a field called 'GenID'?

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          S Offline
          S Offline
          sajid salim khan
          wrote on last edited by
          #4

          the situation is that i have a table Employee info having attributes EmpId EmpName GenID the gender attribute is bieng filled by another table having 2 attribuites GenID and gender i.e GenID is a foriegn key in the Employee info table now when filling the table from a winform i loaded the data in the combo box of gender in form load event but the value member is giving error bcoz i have to select the field from gender and must be saved in the Employee info table sas

          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