My page has 2 RadListboxes, I had written 2 transferred events for each listbox, it worked fine transferring from listbox1 to listbox2
it called RadListBox1_Transferred event but when transfering from listbox2 to listbox1 it calls RadListBox1_Transferred event again.
so I did this
Dim intRoleID As Integer
Dim intUserID As Integer = CInt(UserDD.SelectedValue)
Dim objUserRoleAssociation As clsUserRoleAssociation
Dim blnFlag As Boolean
Status.Visible = True
Try
For Each objItem As RadListBoxItem In e.Items
intRoleID = objItem.Value
Select Case e.SourceListBox.ID
Case "RadListBox1"
blnFlag = clsUserRoleAssociation.AddAssociation(intUserID, intRoleID)
Case "RadListBox2"
objUserRoleAssociation = New clsUserRoleAssociation(intUserID, intRoleID)
blnFlag = objUserRoleAssociation.RemoveAssociation()
End Select
Next
If blnFlag Then
Status.Text = "Success"
Else
Status.Text = "Failed"
End If
Catch ex As Exception
Throw
End Try
this works fine but now drag and drop doesn't work to transfer from listbox2 to listbox1
it called RadListBox1_Transferred event but when transfering from listbox2 to listbox1 it calls RadListBox1_Transferred event again.
so I did this
Dim intRoleID As Integer
Dim intUserID As Integer = CInt(UserDD.SelectedValue)
Dim objUserRoleAssociation As clsUserRoleAssociation
Dim blnFlag As Boolean
Status.Visible = True
Try
For Each objItem As RadListBoxItem In e.Items
intRoleID = objItem.Value
Select Case e.SourceListBox.ID
Case "RadListBox1"
blnFlag = clsUserRoleAssociation.AddAssociation(intUserID, intRoleID)
Case "RadListBox2"
objUserRoleAssociation = New clsUserRoleAssociation(intUserID, intRoleID)
blnFlag = objUserRoleAssociation.RemoveAssociation()
End Select
Next
If blnFlag Then
Status.Text = "Success"
Else
Status.Text = "Failed"
End If
Catch ex As Exception
Throw
End Try
this works fine but now drag and drop doesn't work to transfer from listbox2 to listbox1