3 Replies Latest reply on Oct 8, 2010 12:04 PM by Flex_

    :Drag Drop From Panel to Tree


      I have two panels in a page.  I am creating a Tree control dynamically and adding to a Panel1.  I have to drag an image from panel2 to the Tree on Panel1.


      I set the Tree property to accept the drop. When I drop the image on the Tree,  the DragDropComplete Event is not executing but the DragDropComplete Event of the Panel (Which is Tree parent container)  is executing.


      The DragEnter event on Tree is executing but the DragDropComplete not executing.


      How can I invoke the DragDropComplete event on Tree. Pl show some pointers. I appreciate your help.
        • 1. Re: :Drag Drop From Panel to Tree
          Flex_ Level 1

          Experts !!! pl comment. We can not invoke the DragComplete event on a child ?

          • 2. Re: :Drag Drop From Panel to Tree
            Ramesh Sampenga Level 1

            instead of dragComplete


                 use dragDrop event


            and at the end wirte event.stopImmediatePropagation


            <Tree dragEnter="treeDragEnter(event)"   dragDrop="treeDragdrop(event)" />


            protected function treeDragEnter(event:DragEvent):void







            protected function treeDragdrop(event:DragEvent):void


                 var items:Array = event.dragSource.dataForFormat("items") as Array;

                 var str:String = new String(items[0]);var cols:Array = DG.columns;

                 if(cols.indexOf(str)<0) {





            • 3. Re: :Drag Drop From Panel to Tree
              Flex_ Level 1

              Thanks for the reply. I tried DragDrop .. Still this function not invoked. Only DragEnter gettting invoked and DragComplete and DragDrop are not invoked.