1 Reply Latest reply on Oct 13, 2008 2:54 PM by ntsiii

    Advanced Data Grid - Drag and Drop

    srtr4k
      I have a drag and drop enabled Advance Datagrid that is populated by an arraycollection. Although it is not shown below, each object within the arraycollection has the attribute "GroupID" and based on that id is associated to a group using the GroupingCollection. Dragging and dropping a row from one grouping to the another grouping works great - i.e.if Row2 from GroupA is dragged and dropped into GroupB.

      The problem is that I need to update the database to reflect the change as well. In order to do that I have to capture the GroupID value that is associated with the new group - in this case GroupB. Unfortunately, this is where I am stumped and need some help. Any help would be greatly appreciated.

      GroupA (GroupID = 1)
      -- Row1
      -- Row 2

      GroupB (GroupID = 2)
      -- Row1


      private function dragHandler(e:DragEvent):void{
      var dg:AdvancedDataGrid = AdvancedDataGrid(e.currentTarget);

      //Get GroupID of new grouping
      //Call webservice and udpate database
      //Refresh datagrid
      }