I have a dropdown list with 4 values. I'm trying to add an If statement in the event that a value is selected from the dropdown list. Each value in the dropdown list enables another dropdown list later on in the form. I have no syntax errors when I run the code, but it still doesn't work. No mater what value I select the rest of the form stays disabled.
Code below:
Protected Sub FunctionPerformedDD_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles FunctionPerformedDD.SelectedIndexChanged
If (FunctionPerformedDD.SelectedIndex.Equals(0)) Then
ElseIf (FunctionPerformedDD.SelectedIndex.Equals(1)) Then
ReportDD.Enabled = True
ElseIf (FunctionPerformedDD.SelectedIndex.Equals(2)) Then
FormDD.Enabled = True
Else
FormDD.Enabled = True
End If
End Sub
Aucun commentaire:
Enregistrer un commentaire