SelectedIndexChanged event for combo box

J

Jack

I have two combo box, I need to take SelectedValue from
ComboBox1, and pass
it as a parameter on SelectedIndexChanged event to another
SPROC which will fill da and populate ComboBox2. I found
in the form_load event,
SelectedIndexChanged event is triggered, but I want to
disable the SelectedIndexChanged event
in the form_load, how can I do?

Any help are appreciated. Thanks!
 
J

Jack

H

Herfried K. Wagner [MVP]

* "Jack said:
I have two combo box, I need to take SelectedValue from
ComboBox1, and pass
it as a parameter on SelectedIndexChanged event to another
SPROC which will fill da and populate ComboBox2. I found
in the form_load event,
SelectedIndexChanged event is triggered, but I want to
disable the SelectedIndexChanged event
in the form_load, how can I do?

You can use a boolean flag to indicate that the code in the handler
should not be processed when loading the form, or you can add/remove
the event handlers dynamically (in VB.NET using 'AddHandler' and
'RemoveHandler').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top