SelectedIndexChanged

  • Thread starter Thread starter A-PK
  • Start date Start date
A

A-PK

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.
 
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
 
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.
 
Back
Top