Suspend ComboBox SelectedIndexChanged event

J

Joe

I need to suspend this event while I change the SelectedItem property. I
can't have the event be fired in this case because the event will cause the
same method to be called again.

Is there anyway to do this without doing a -= to the event and resetting it
after?
 
P

Pete Davis

The event is going to be fired. There's nothing you can do about it.
Unsubscribing and resubscribing as you were pointing in the end, is
precisely how you would handle the situation.

Pete
 
J

Joe

That's what I thought. Thanks.

Pete Davis said:
The event is going to be fired. There's nothing you can do about it.
Unsubscribing and resubscribing as you were pointing in the end, is
precisely how you would handle the situation.

Pete
 

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