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 make a default value in combobox where item doesn't exist in collection

how to make a default value in combobox where item doesn't exist in collection

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 2 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.
  • T Offline
    T Offline
    tonyonlinux
    wrote on last edited by
    #1

    I have a combobox that I fill during the form load. That works fine. The question I have is how do I make it say "Select An Item to autofill" or whatever? I understand I could use selectedindex or something like that but the actually text i wish to display by default is not in the list. thanks wasn't sure what to search for on this :(

    A 1 Reply Last reply
    0
    • T tonyonlinux

      I have a combobox that I fill during the form load. That works fine. The question I have is how do I make it say "Select An Item to autofill" or whatever? I understand I could use selectedindex or something like that but the actually text i wish to display by default is not in the list. thanks wasn't sure what to search for on this :(

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      I would just add it to the combo data list and then set it to be the selected value. Nothing fancy. :cool:

      Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
      Honestly. It's the honest ones you want to watch out for...

      T 1 Reply Last reply
      0
      • A Abhinav S

        I would just add it to the combo data list and then set it to be the selected value. Nothing fancy. :cool:

        Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
        Honestly. It's the honest ones you want to watch out for...

        T Offline
        T Offline
        tonyonlinux
        wrote on last edited by
        #3

        YEAH makes since to do it that way i guess, but the keywords are tied into each row on the database thats the only problem I have.

        modified on Sunday, February 14, 2010 3:46 AM

        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