1 Reply Latest reply on Nov 30, 2009 1:51 PM by billy white

    Referencing ADG dataProvider with drag and drop

    billy white



      I have two AdvancedDataGrids using GroupingCollections. Drag and drop from one to the other is working correctly, but I'm having trouble finding a reference to the data collection after the drop. Whenever the 'drop grid' gets modified, I need to know so I can update some other stuff.


      On the drop grid I have an XMLListCollection setup as its GroupingCollection's source. I have a listener on it for CollectionEvent.COLLECTION_CHANGE. When I drop contents from the source grid to the drop grid, visually, I see the new data in the grid, but the event handler doesn't fire.


      Adding a listener for DragEvent.DRAG_DROP doesn't work since it seems that it gets fired before the data gets added to the drop grid.


      It is very possible that I'm overlooking something basic or not fully understanding something as I'm new to Flex, so any help would be greatly appreciated. I can post some code if anyone thinks it will help.




        • 1. Re: Referencing ADG dataProvider with drag and drop
          billy white Level 1

          Ok, I think I figured this out.


          I was using a GroupingCollection on my ADG, with a source of an XMLListCollection. I think the GroupingCollection auto-wrapped the XMLListCollection to HierarchicalData, and somewhere I lost my original XMLListCollection reference.


          Basically, this didn't work, and CollectionChange doesn't fire on the XMLListCollection:

          ADG > GroupingCollection > XMLListCollection ::


          But this does:

          ADG > HierarchicalData > XMLListCollection


          If any experts care to explain this or more elegantly spell this out I'd love to hear.