That'd work... but I'd be more inclined to save off a copy of my initial data when I stick it in the ArrayCollection, then on submit walk the two collections seeing what changed. But, that's really just my preference.

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com



Edward Yakop wrote:

Since the previous question is already answered by Scott. I won't
repeat the answer here.

> My ultimate goal is that when the user clicks the submit button, I get
> only the records in myDatagrid that have changed. By the time the app
> is done there may be hundreds of rows of records with up to 10 fields.

What u can do is to addEventListener for the
[mx.events.CollectionEvent.COLLECTION_CHANGE] event type.
When u get a call back u can check the [kind] and [location] property
of CollectionEvent to determine whether the collection has been
modified in any way. The [kind] constant that you're looking for is
[mx.events.CollectionEventKind.UPDATE].

This way you don't have to iterate your array collection. The draw
back is u have to store what has been modified even if the user
doesn't click submit.

Regards,
Edward Yakop

Reply via email to