This is a migrated thread and some comments may be shown as answers.

RadListBox1_Transferred event

3 Answers 79 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Sneha Gokarn
Top achievements
Rank 1
Sneha Gokarn asked on 11 Dec 2009, 04:26 AM
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



3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 11 Dec 2009, 01:45 PM
Hi Sneha Gokarn,

Have you set the EnableDragAndDrop property to true on the second RadListBox?

All the best,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sneha Gokarn
Top achievements
Rank 1
answered on 11 Dec 2009, 05:52 PM
yes!

0
Simon
Telerik team
answered on 18 Dec 2009, 02:20 PM
Hi Sneha Gokarn,

Can you please also clarify how the drag & drop is not working? Is the Transferred event firing when you drag & drop from ListBox2 to ListBox1?

All the best,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ListBox
Asked by
Sneha Gokarn
Top achievements
Rank 1
Answers by
Simon
Telerik team
Sneha Gokarn
Top achievements
Rank 1
Share this question
or