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 view a particular value of a combo box?

how to view a particular value of a combo box?

Scheduled Pinned Locked Moved C#
questiontutorial
3 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
    Saira Tanwir
    wrote on last edited by
    #1

    hello friends, i have some values displayed in a comboBox. the selected value is stored in a variable. now the logic is this that when a button is pressed, the saved value of the combo Box is to be displayed in the combo Box. how do i accomplish this? i have tried adding the value through the 'Items' property. it adds the value into the combolist but doesn't display it directly. reply soon plz. Saira

    L B 2 Replies Last reply
    0
    • S Saira Tanwir

      hello friends, i have some values displayed in a comboBox. the selected value is stored in a variable. now the logic is this that when a button is pressed, the saved value of the combo Box is to be displayed in the combo Box. how do i accomplish this? i have tried adding the value through the 'Items' property. it adds the value into the combolist but doesn't display it directly. reply soon plz. Saira

      L Offline
      L Offline
      Laddie
      wrote on last edited by
      #2

      You can simply say comboBox.SelectedValue = Value; / comboBox.Value (in case it is a windows form) (Assuming the value was already in the list)

      Thanks Laddie Kindly rate if the answer was helpful

      1 Reply Last reply
      0
      • S Saira Tanwir

        hello friends, i have some values displayed in a comboBox. the selected value is stored in a variable. now the logic is this that when a button is pressed, the saved value of the combo Box is to be displayed in the combo Box. how do i accomplish this? i have tried adding the value through the 'Items' property. it adds the value into the combolist but doesn't display it directly. reply soon plz. Saira

        B Offline
        B Offline
        buchstaben
        wrote on last edited by
        #3

        use SelectedValue property

        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