In attempting to use the DualList control, I've found that I can't get it to populate during an event. If I populate it during the page load, it works fine, but if I do it on say an itemChangeEvent, it won't populate. Can anyone explain why?
Sub bindDualList()
Dim objRoles As New Roles.RoleController
Dim arrSysRoles As New ArrayList
arrSysRoles = objRoles.GetPortalRoles(PortalId)
Dim arrAvailableAdminRoles As New ArrayList
Dim arrAssignedAdminRoles As New ArrayList
arrAvailableAdminRoles = arrSysRoles
ctlAdminRoles.Available = arrAvailableAdminRoles
ctlAdminRoles.Assigned = arrAssignedAdminRoles
ctlAdminRoles.DataBind()
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Page.IsPostBack = False Then
bindDualList() 'Works
End If
End Sub
Private Sub ddlLocs1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlLocs1.SelectedIndexChanged
'fill dualistcontrol
bindDualList() 'Doesn't work
End Sub