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