In the application I am working on, the user can drag and drop items from one datagrid to another. Now regardless of how the user exits the window, the data is always saved. My question is basically, what would be the best strategy for saving these changes. The dataProviders for both grids are array collections populated with info gathered from a local database. I can think of two ways to do this thus far, both can work as far as I can tell.
Strategy 1: Wait for the user to close out the window and then save all the changes at once. For a new order, this is as simple as a loop through the array collection and doing an insert for each row. However for updating orders, I'm not sure but is it possible to check for changed values while looping through and then doing an update for the changes? I see the itemChanged property and it looks like the thing I need. This is in my opinion the toughest to implement if just for the update functionality. Strategy 2: On every dragDrop event, on every change in the itemRenderers, do either an insert or an update statement depending on whether a new item is dropped in, or being updated. This to me seems like the more practical solution and what I am considering at the moment. Thoughts? Opinions? Thanks in advance. Brian Ross Edwards Tech-Connect LLC

