3 Replies Latest reply on Nov 18, 2010 2:53 AM by Omegalex_FR

    Drag & Drop Hierarchical data (AdvancedDataGrid)




      I'm working in Flex 3, sdk 3.5


      I'm looking to drag & drop data from an AdvancedDataGrid which uses grouping (hierarchical data) to a classic DataGrid.

      I've come to understand that this is not possible if the destination DataGrid does not implement the exact same grouping as the source DataGrid.  However, in my destination DataGrid, I'm looking to display the data in a different manner then in the source DataGrid.  Hence my problem.

      Is there a workaround?  Is it possible to catch the start of the Drag and modify the data so that it fits into the destination DataGrid?


      Thanx in advance for the insight.

      Best Regards


        • 1. Re: Drag & Drop Hierarchical data (AdvancedDataGrid)
          prksingh Adobe Employee

          The beginning of the Drag from AdvancedDataGrid can be caught using the "dragStart" event on the grid. In the event handler for this method, make any changes you need. You may also want to check out the following events of the AdvancedDataGrid:






          • 2. Re: Drag & Drop Hierarchical data (AdvancedDataGrid)
            Pier.B Level 1

            thanx for the reply

            unfortunately, I'd already tried that.

            For some reason i don't understand, i can't catch the event.  don't know if it's because it's never dispatched or what.

            As i said in my OP, i'm using hierarchical data.  I'm also using a renderer.


            I've managed to have the destination grid (which i changed to an AdvancedDataGrid) accept the drop, but when i drop the element, i get an error in the AdvancedDataGrid class, in the addItemsToTarget function


            for (var i:int = n - 1; i >= 0; i--)








            where targetADG._dropData is null.

            • 3. Re: Drag & Drop Hierarchical data (AdvancedDataGrid)

              I have exatcly the same problem,

              Why the event has no relatedObject in this case

              How to do to?