Update the data item on the ComboBox's CHANGE event.
Thanks for the reply.
The itemEditor is a mxml custom component (ProductItemRenderer), so I am embedding it into the datagrid column as follows:
I can run a CHANGE event on the mxml component, but how do I get that to filter through to the datagrid so that it triggers a DataGridEvent.ITEM_EDIT_END event?
Well, you could fake the event, but in my prototypes, I don't bother. The
CHANGE event will be reflected in the dataProvider and thus in all the
renderers and I don't want to shut down the edit session right away in case
the user goes back and changes the same combobox again. Then when they tab
or click on another cell, ITEM_EDIT_END is dispatched but because the
updated data is already stored there is no change event from the collection.
OK, excuse me being a noob, but how do I get the CHANGE event in the combo to update the dataProvider?
Sorry, but I'm pretty new to this...
Depends on the data items. If they are bindable, just update the
appropriate field in the data item. Otherwise, you have to get to the
dataProvider to call itemUpdated.
After lots of trying different things, by far the easiest was to create a custom event on the itemeditor component, which gets dispatched on the combobox close event. The main view that holds the datagrid then has an eventlistener that picks up the event and updates the datagrid dataprovider without the combo losing focus.