Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34741

Spark DataGrid Drag and Drop non functioning

    XMLWordPrintableJSON

Details

    Description

      Description

      Dropping a dragged item onto the grid does not work. When calculating the DropLocation (in dragEnter, dragOver, dragDrop handlers) it falls through to LayoutBase.calculateDropIndex which simply executes "return target.numElements;" That's clearly not how the dropIndex should be calculated on the grid. The GridLayout class should be overriding this method and calculating it correctly.

      Furthermore, upon trying to fix this issue (which is more complicated than it should be because DataGrid.calculateDropPosition() is marked as private) the DataGrid.calculateDropPosition() does not perform a null check on the DropLocation (which is valid value).

      Steps to Reproduce
      1. Create a DataGrid with dragEnabled, dragMoveEnabled, and dropEnabled all set to true.
      2. Try dragging rows around and dropping them.

      Environment
      Windows 8, Apache Flex 4.14

      Expected Behavior
      Seeing the drop indicator.
      The expected behavior of dragging a row and dropping it in another location.

      Actual Behavior
      No drop indicator. Dropping a row does nothing.

      Attachments

        1. DragDropGrid.as
          8 kB
          Devin Holloway
        2. DataGridDragDrop.as
          10 kB
          Jan Weber

        Issue Links

          Activity

            People

              paeros Mark Kessler
              Devin H Devin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: