0 Replies Latest reply on Oct 7, 2006 5:00 PM by rectalogic

    List drag and drop

      When dragging and dropping (moving, dragMoveEnabled=true) an item in a List or DataGrid, the selection is lost. It looks like the intent is to select the dropped item after the drop, but ListBase.mouseEventToItemRendererOrEditor() when called from List.mouseUpHandler cannot find the item the mouse is over because event.target is the MovieClip holding the drag cursor (i.e. _DragManagerStyle__embed_css_Assets_swf_mx_skins_cursor_DragMove_505766336) and it is not parented by the List.

      A different problem occurs when copying via drag and drop (dragMoveEnabled=false). The copied items are references to the original item (not a copy). So the List ends up with multiple references to the same object instances, with the same UIDs. Since the list selection handling is based on object UID, it doesn't work right when multiple objects have the same UID. So if you copy a couple of rows using drag and drop, then clicking any of the selected rows will correctly set selectedIndex, but may highlight the wrong row.

      You can see examples of both of these issues here: