Reordered event of Listbox issue

2 posts, 1 answers
  1. Greg Barretta
    Greg Barretta avatar
    10 posts
    Member since:
    Jan 2010

    Posted 28 Jul 2010 Link to this post

    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)
       End Sub
  2. Answer
    Veronica avatar
    1213 posts

    Posted 03 Aug 2010 Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top