Condition ComboBox VB.Net

pictom41 Messages postés 508 Date d'inscription   Statut Membre Dernière intervention   -  
 mathsroller97 -
J'ai un problème avec mes ComboBox, je vous fais voir le code :
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged

If ComboBox1.SelectedValue = "Lady Gaga" Then

ComboBox2.Items.Add("Alejandro")




End If


End Sub

Sauf que quand je choisis Lady Gaga dans la combobox 1, je n'ai pas Alejandro dans la 2ème combobox.
Il y aurait t'il un raté dans ma condition ?
Ou autre ?
Cordialement

1 réponse

pm31 Messages postés 57 Date d'inscription   Statut Membre Dernière intervention   1
 
Bonjour , essaie ça :

If ComboBox1.SelectedItem = "Lady Gaga" Then

ComboBox2.Items.Add("Alejandro")




End If

CDLT
1
mathsroller97
 
merci ça marche :)
0