enable/disable dropdownlist
The following code will disable the control:
Public Sub disabledddl(ByVal cs As ControlCollection)
Dim d As Control
For Each d In cs
If TypeOf d Is DropDownList Then
CType(d, DropDownList).Enabled = False
End If
disabledddl(d.Controls)
Next
End Sub
The following code will enable the control
Public Sub enabledddl(ByVal cs As ControlCollection)
Dim d As Control
For Each d In cs
If TypeOf d Is DropDownList Then
CType(d, DropDownList).Enabled = True
End If
disabledddl(d.Controls)
Next
End Sub
Then call the sub routine as:
enabledddl(Me.Controls)
disabledddl(Me.Controls)