0 Replies Latest reply on May 1, 2007 6:30 AM by JamesDWilson

    Previously selected DataGrid row on change event

    JamesDWilson Level 1
      Is there any way to detect what was the previous row clicked in a datagrid? I've tried managing it myself too with limited success.
      quote:

      private var LastSelectedRow:Object;
      private function WarrantGridItemClick(event:ListEvent):void
      {

      if(LastSelectedRow == null)
      LastSelectedRow = WarrantGrid.selectedItem;

      Application.application.ConfirmSaveChanges(event);
      parentDocument.populateFormWithObject(this, event.itemRenderer.data as ObjectProxy);

      LastSelectedRow = WarrantGrid.selectedItem;
      }


      AS is so asynchronous though I think my row is getting set too fast and the ConfirmSaveChanges gets the wrong row.