Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute code before SelectedIndexChanged in combobox occ
Message
 
À
03/02/2005 10:18:24
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00983452
Message ID:
00983464
Vues:
12
Bonnie,
Yes I have subclassed all the controls (well not all of them but the ones I use <s>). That is a good idea to create my own before and after selectedindexchanged events. I had thought about it (believe it or not), but just wanted to make sure that there want something already there (with a goofy name) that did what I wanted it to do.
Thank you for your reply and the confirmation that I have to write my own code :)

Sincerely,
Einar
>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
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform