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 SelectedValue from Text ,,, Combobox ?

How to get SelectedValue from Text ,,, Combobox ?

Scheduled Pinned Locked Moved C#
databasetutorialquestion
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.
  • K Offline
    K Offline
    kindman_nb
    wrote on last edited by
    #1

    Hay .. I have a table for eg , emp with the next data : ID Name 1 AA 2 BB 3 CC I fill the combo box as the next : combobox.ValueMember=ID; combobox.DisplayMember = Name; the user see Name but the application save ID in the database . then when I navigate records , sure the combobox dispaly the ID which is saved on database ,, I tried to do that : combobox.SelectedValue = combobox.Text; but it didn't give me the required result.. I want to view the Value (Name field) instead of text (ID field) thanks

    jooooo

    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