I've got a data grid that's supposed to show hierarchical
data in one row. If the user clicks one of the leaf nodes, the node
is editable, there are 2 options:
* Add Item node
* Existing node
When clicking the add item node, I want a textinput to
replace the label, once the edit is done, the datagrid must add a
new item to the dataprovider and preserve the old Add Item
node...this is similar to power point's bulletted lists, where an
"add ..." appears in grey.
Here is the code I have for the mixed renderer-editor.
Here are the problems I am facing:
1 - The focus_out event does not always trigger. This causes
my item to remain in edit mode.
2 - Dispatching the AdvancedDataGridEvent.ITEM_EDIT_END event
causes the program to crash with the following message:
TypeError: Error #1009: Cannot access a property or method of a
null object reference. at
at flash.events::EventDispatcher/dispatchEventFunction() at
This appears to be due to the data property not being set
(the debugger lists a series of variables, the data and listData
variables are null)...but I don't know how to set these guys.
3 - How can I add to the source collection easily?