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

Reordered event of Listbox issue

1 Answer 45 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Greg Barretta
Top achievements
Rank 1
Greg Barretta asked on 28 Jul 2010, 05:56 PM
I am using the OnReordered event of a listbox to obtain the item index and the item value of an item being dragged and dropped.  The item index does correctly represent the place in the list that I dropped an item. If I drag and drop within the same list, everything works as expected. My issue is that when I drag and drop from another listbox, the item value reflected is not the value of the item being dropped, but the value of the last item in the listbox. Is this a bug or is this designed this way? Any ideas for a workaround? Thanks!
Protected Sub listAssigned_Reordered(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListBoxEventArgs) Handles listAssigned.Reordered
      For Each item In e.Items
          OrderNode(item.Value, item.Index)
       Next
   End Sub

1 Answer, 1 is accepted

Sort by
0
Accepted
Veronica
Telerik team
answered on 03 Aug 2010, 11:43 AM
Hi Greg Barretta,

When you drag and drop within one and the same listbox it is normal that the OnReordered event adequately represents the item value. However when dragging an item from another listbox in this you'll need the OnDropped event to be able to get the corresponding item value.

Please let me know if you need more help.

Kind regards,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ListBox
Asked by
Greg Barretta
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or