我有3个rad下拉列表。在页面加载ComBox_MDCList
被禁用,直到选择其中一个下拉菜单索引="比萨"。问题是,在第一个下拉列表启用后,如果选择了第二个下拉列表但不是= Pizza,它将再次禁用。只要1次下拉=比萨,我怎样才能启用ComBox_MDCList
?
页面加载
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
ComBox_MDCList.Enabled = False
End Sub
sub叫
Protected Sub MDCList()
If (ComBox_Growth1.Text Or ComBox_Growth2.Text = "Pizza") Then
ComBox_MDCList.Enabled = True
Else
ComBox_MDCList.Enabled = False
End If
End Sub
第一个投递框vb
Protected Sub ComBox_Growth1_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ComBox_Growth1.SelectedIndexChanged
If ComBox_Growth1.Text = "Pizza" Then
MDCList()
End If
End Sub
第二个投递框vb
Protected Sub ComBox_Growth2_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ComBox_Growth2.SelectedIndexChanged
If ComBox_Growth2.Text = "Pizza" Then
MDCList()
End If
End Sub
答案 0 :(得分:1)
尝试
Protected Sub MDCList()
If (ComBox_Growth1.Text = "Pizza" Or ComBox_Growth2.Text = "Pizza") Then
ComBox_MDCList.Enabled = True
Else
ComBox_MDCList.Enabled = False
End If
End Sub
Protected Sub ComBox_Growth1_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ComBox_Growth1.SelectedIndexChanged
MDCList()
End Sub
Protected Sub ComBox_Growth2_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Handles ComBox_Growth2.SelectedIndexChanged
MDCList()
End Sub