Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute code before SelectedIndexChanged in combobox occ
Message
De
03/02/2005 10:18:24
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00983452
Message ID:
00983460
Vues:
11
Einar,

One solution is to create some events in your ComboBox sub-class (you *have* subclassed your controls, I hope). Create a BeforeSelectedIndexChanged event (and, while you're at it, you might as well create an AfterSelectedIndexChanged event also). Basically, you'd need some code in some of the mouse events and keydown/up events to properly fire the Before and After events. We've done it with a ListView, but not with a Combo ... should be somewhat similar, so I'm sure it's do-able.

Just some food for thought ...

~~Bonnie



>I would like to execute some code before the SelectedIndexChanged event occurs in a combobox. Based on the code executed I might not allow the SelectedIndex to change, i.e. revert back to the previous SelectedIndex.
>As far as I see the only relevant event is SelectedIndexChanged, and I would have to store the previous SelectedIndex and revert back manualy (i.e. through code).
>
>Any other thoughts on this issue would be appreciated.
>
>Thanks,
>Einar
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform