My application implements a drag and drop between two datagrids.
I would like to keep track of how many times a particular row in the source datagrid has been dragged to the target.
The drag and drop handler should increment a DataGridColumn in the source datagrid row each time this happens.
I can't figure out a way to refer back to the source datagrid and set a value in its dataprovider from within the drag and drop handler function.
The source datagrid is in a module and the target datagrid in in a popup called from the module. The function below is in the popped up custom component.
public function dragDropHandler(event:DragEvent):void
//From which component was the drag initiated? This works sComponentName is set
sComponentName = String(event.dragInitiator);
//This does not work, compile error
iPos = event.dragInitiator.selectedIndex;
trace("Comp:MealPlanDetailCreate, function:dragDropHandler - event.dragInitiator: " + event.dragInitiator + " parent container: " + event.dragInitiator.parent)
trace( " sComponentName: " + sComponentName +" name pos: " + sComponentName.indexOf("dgMP"))