Okay, that's a lot of code to take in but thanks that should be very
helpful. So far my ideas have been revolving around my second
strategy, which I am considering using a modified version of this code
for the drag and drop stuff. I only need to figure out the right
places to put the functions I need to perform the insert/update
statements. Item renderers will simply call the needed functions.
----------
private function dragToOrders(event:DragEvent):void
{
var draggedItems:Object = new Object();
draggedItems = event.dragSource.dataForFormat("items");
var n:int = orderDetailArray.length;
for (var i:int = 0; i < n; i++)//Looping through to check for
duplicate entries
{
if (orderDetailArray[i].UniqueID == draggedItems[0].UniqueID)
{
orderDetailArray[i].Qty ++;
event.preventDefault();
adgOrders.dataProvider.dispatchEvent(new
CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
return;
}
adgOrders.dataProvider.dispatchEvent(new
CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
}
}
----------
I'm not exactly sure of the right spot to put the function(s) to
modify the dataProvider and the database using its items.