Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute code before SelectedIndexChanged in combobox occ
Message
De
22/02/2005 09:22:40
 
 
À
22/02/2005 08:36:37
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00983452
Message ID:
00989211
Vues:
32
That would probably work too.

~~Bonnie

>you can take the idea to add the code, to your class.
>
>
>Dim intLastIndex As Integer
>
> Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
> If Not AllowChangeIndex() Then
> CType(sender, ComboBox).SelectedIndex = intLastIndex
> End If
>
> intLastIndex = CType(sender, ComboBox).SelectedIndex
> End Sub
>
> 'You could also use a variable as a flag that indicates
> 'if the user can or not change the item
> Private Function AllowChangeIndex() As Boolean
> 'Code to allow or not change the index
> Return False
> End Function
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