简体   繁体   中英

Flex Datagrid editing cells in same row not firing collection change event

I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong?

Any help appreciated.

That makes sense that it would act like that since each row is an object in the collection, it would only dispatch the event when you are done editing the object in the collection (no just the property of the object in the collection).

I suggest you use a better event that gets dispatched every time you finish editing a dataGrid cell: Try using "itemEditEnd"

http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_7.html
the first example of the above link uses

itemEditEnd="getCellInfo(event)"

I suggest you use a similar approach for updating your data.
Let me know if this helps, thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM