I have an AdvancedDataGrid with editable parameter to "true". My problem is that after a successfull drag & drop, the item is being edited and I don't want this to happen.
I tried to create a custom advancedDataGrid with this:
override protected function dragCompleteHandler(event:DragEvent):void{
trace("call dragCompleteHandler");
super.dragCompleteHandler(event);
clearAllSelection();
selectedItem = null;
}
But It doesn't work and I just don't know if I have to stop an event with preventDefault or something else. I also looked into the Adobe AdvancedDataGrid code and it seems that after a dragcomplete event there is nothing dispatched...
How can I stop this annoying edition (or focus) after a drag & drop?
EDIT 27/02/2012
The solution is to listen to DRAG_START and DRAG_COMPLETE events, in the constructor (or init function of the component):
addEventListener(DragEvent.DRAG_START,itemDragStartHandler);
addEventListener(DragEvent.DRAG_COMPLETE,itemDragCompleteHandler);
and :
protected function itemDragStartHandler(event:DragEvent):void
{
editable = "false";
}
protected function itemDragCompleteHandler(event:DragEvent):void
{
editable = "true";
}