473,378 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Suspend ComboBox SelectedIndexChanged event

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?
Nov 16 '05 #1
2 2404
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

"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
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?

Nov 16 '05 #2
Joe
That's what I thought. Thanks.

"Pete Davis" <pd******@NOSPAM.hotmail.com> wrote in message
news:1Z********************@giganews.com...
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

"Joe" <J_no_spam@_no_spam_Fishinbrain.com> wrote in message
news:el**************@TK2MSFTNGP09.phx.gbl...
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?


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jcb1269 | last post by:
How do you select an item in a combobox. I've tried the Click events and that works only when I actually click the combobox. I want to select an item in the combbox not the combbox itself. Any...
0
by: George Hartas | last post by:
I am using Visual C# .NET 2003 to make a ComboBox accept both mouse and keyboard selection. For mouse selection code, I double-clicked ComboBox to get the default "comboBox1_SelectedIndexChanged"...
3
by: ScottO | last post by:
I would like the user to have to select something in a System.Windows.Forms.ComboBox. private void MyForm_Load(object sender, System.EventArgs e) { ... comboBox.DataSource = data;...
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
7
by: sparkle | last post by:
Hi Everybody, I'm filling a combobox from a class, which works fine on it's own. But when I insert code to fill in other controls something in the combobox fill is causing the...
2
by: blue_nirvana | last post by:
I use a AddHandler statement in the load event of a form to assoicate a routine with a combobox. When I populate the form, I select the approiate value from the combobox by using...
0
by: peter78 | last post by:
I wanted to implement an autocomplete feature on the combobox where you would type in partial text and it would try to match it for you. It doesn't exist in .Net yet, but I'm guessing it will in...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
2
by: tshad | last post by:
In my VS 2003 Windows Forms page, when I initially fill my ComboBox (SystemList), it goes to the SelectedIndexChanged event which calls the Loademails() function. I then call it again in the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.