I am at a loss on how to get the following to work:
1. Select a row on a DataGrid.
2. Edit that row, maintaining the original (i.e., ArrayCollection not modified).
3. On save, update the ArrayCollection via a removeItemAt() and addItemAt().
4. dgrid.selectedItem = added row.
The problem lies in #4. No matter what I do, the selection clears after I lose control. I've tried inserting validateNow() calls, refresh(), etc. I've added an event listener on ListEvent.CHANGE (not tripped when the selection clears.)
Has anyone successfully maintained the row selection?
That too was among the solutions I tried. When I debugged into the datagrid, setting one (item or index) caused the other to properly update. At some later point after I lost the ability to debug (back into the core engine), it cleared.
Took a coworker's pair of eyes to uncover my stupor error. All is well now.