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. Visual Basic
  4. Combobox SelectedIndexChanged event

Combobox SelectedIndexChanged event

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 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.
  • H Offline
    H Offline
    helelark123
    wrote on last edited by
    #1

    Hello, I am programming in VB2005 I am populating combobox on load event as following: Dim dt As DataTable = ... ComboBox1.DataSource = dt ComboBox1.DisplayMember = "MODEL" ComboBox1.ValueMember = "MODEL" The problem is the ComboBox1_SelectedIndexChanged event fired. I would like to prevent the event to fire at load. I know that I can use flag or addhandler after populating to solve this problem but I would like to know if there is any combobox property or method that prevent this event to fire when populating the combobox by databinding? Thank you.

    Shay Noy

    C 1 Reply Last reply
    0
    • H helelark123

      Hello, I am programming in VB2005 I am populating combobox on load event as following: Dim dt As DataTable = ... ComboBox1.DataSource = dt ComboBox1.DisplayMember = "MODEL" ComboBox1.ValueMember = "MODEL" The problem is the ComboBox1_SelectedIndexChanged event fired. I would like to prevent the event to fire at load. I know that I can use flag or addhandler after populating to solve this problem but I would like to know if there is any combobox property or method that prevent this event to fire when populating the combobox by databinding? Thank you.

      Shay Noy

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      shaynoy wrote:

      I would like to prevent the event to fire at load.

      You can't.

      shaynoy wrote:

      I know that I can use flag or addhandler after populating to solve this problem but I would like to know if there is any combobox property or method that prevent this event to fire when populating the combobox by databinding?

      No.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      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