0 Replies Latest reply on Oct 29, 2011 12:41 AM by igor1986

    Drag&Drop items inside AdvancedDataGrid

    igor1986 Level 1

      Hi everybody! I've an AdvancedDataGrid with Hierarchical data structure. The dataProvider is XMLListCollection. I want to implement feature  so user can drag,move and drop (or reorder in other words) items inside it. It easy achieved by setting ADG properties. But now i want to access dragged data. I try to use such code:

       

      private function onMyADG_dragComplete(event:DragEvent):void {

           var Obj:Object = event.dragSource.dataForFormat("items") as XML;

      }

       

      As a result Obj var is returned always as null object reference. I expected it should be XML object with some data.

      I've read docs but there only examples with ArrayCollection as dataProvider, like this

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

       

      I out of ideas, please help me to access dragged data.

      Thanks.