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. How to get Value from Combobox.valuemember prpperty

How to get Value from Combobox.valuemember prpperty

Scheduled Pinned Locked Moved C#
databasehelptutorialquestion
5 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.
  • H Offline
    H Offline
    honeyashu
    wrote on last edited by
    #1

    I have assigned from a data source Display Member as "Client Name" & Value Member as "Client ID" to a combo box. Now for a query i need to pass the Client ID value as parameter but all i am getting is Combobox.Text/ Combobox.SelectedItem/.. as Client Name. How can i get the value of ClientID for the Selected Client Name from the Combobox. Please Help.

    J G 2 Replies Last reply
    0
    • H honeyashu

      I have assigned from a data source Display Member as "Client Name" & Value Member as "Client ID" to a combo box. Now for a query i need to pass the Client ID value as parameter but all i am getting is Combobox.Text/ Combobox.SelectedItem/.. as Client Name. How can i get the value of ClientID for the Selected Client Name from the Combobox. Please Help.

      J Offline
      J Offline
      JoeSharp
      wrote on last edited by
      #2

      hi try with SelectedValue regards

      H 1 Reply Last reply
      0
      • H honeyashu

        I have assigned from a data source Display Member as "Client Name" & Value Member as "Client ID" to a combo box. Now for a query i need to pass the Client ID value as parameter but all i am getting is Combobox.Text/ Combobox.SelectedItem/.. as Client Name. How can i get the value of ClientID for the Selected Client Name from the Combobox. Please Help.

        G Offline
        G Offline
        Greg Chelstowski
        wrote on last edited by
        #3

        ComboBox.SelectedValue

        is my best guess. ---- man i really should refresh this page more. ;)

        var question = (_2b || !(_2b));

        1 Reply Last reply
        0
        • J JoeSharp

          hi try with SelectedValue regards

          H Offline
          H Offline
          honeyashu
          wrote on last edited by
          #4

          Didn't Worked... I already did.. Please tell me any way to extract this value...

          G 1 Reply Last reply
          0
          • H honeyashu

            Didn't Worked... I already did.. Please tell me any way to extract this value...

            G Offline
            G Offline
            Greg Chelstowski
            wrote on last edited by
            #5

            Favorite saying down in my dept: "Works on my machine, i don't know how you manage it!". ;)

            var question = (_2b || !(_2b));

            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