By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

SelectedIndexChanged

P: n/a
Could someone guide me why "SelectedIndexChanged" always trigger event twice
I tried to put a simple messagebox.show("test") there. but always poping up
twice messagebox. please guide me.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cor
Hi Apc,

I never saw it is triggered twice, however I (and a lot of others) use a
bool/flag/switch whatever you name it, that I set at the end of the load
event on true, and let the selectedIndexChange event only take action if
that switch is true.

I hope this helps,

Cor
Could someone guide me why "SelectedIndexChanged" always trigger event twice I tried to put a simple messagebox.show("test") there. but always poping up twice messagebox. please guide me.

Nov 20 '05 #2

P: n/a
binding will cause it to fire when loaded.
if you bind to selectedValue,selectedindex,... it would
fire again as its value is changing again.
I'm using flag a flag in the forms load event to exit the
SelectedIndexChanged 'if bolBinding' as the other post
suggests.
-----Original Message-----
Could someone guide me why "SelectedIndexChanged" always trigger event twiceI tried to put a simple messagebox.show("test") there. but always poping uptwice messagebox. please guide me.
.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.