Hi, I have an ADG with a hierarchical tree in an editable column.
Only the leaf nodes should be editable, and normally they are. When clicking or double clicking on the parent nodes, the tree only expands (due to the following code)
public function itemDoubleClick_handler(e:ListEvent):void
However, under special circumstances (if the tree is drag-dropped to an area, triggering an Alert box to warn the user), when the control receives focus again, the parent node now displays an itemEditor.
I had attempted to intercept the editing using the itemEditBeginning event, but it is not triggered in this case. (it normally is when a leaf node is being edited.
Is this a known bug? Is there a workaround? I have tried to give focus away upon returning from the Alert, but this does not seem to work.
I have found a workaround. The itemEditBeginning event is not called, but the itemEditBegin is.
The following code rejects these erronous edits:
public function checkEditBeginning(e:AdvancedDataGridEvent):void
//Sometimes the ADG will be buggy and try and edit a parent node, we refuse those edits
if(e.itemRenderer is AdvancedDataGridGroupItemRenderer && AdvancedDataGridListData(AdvancedDataGridGroupItemRenderer(e.itemRenderer).listData).hasC hildren)
..should be called on the itemEditBegin