3 Replies Latest reply on Apr 23, 2010 9:38 AM by Llanfar

    FB3 DataGrid select after add/delete sequence


      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?