2 Replies Latest reply on Jun 25, 2008 4:16 PM by Garyl Woolworth

    Delete rows out of a DG

    187_2007 Level 1
      I have a Datagrid (DG) that has 10 rows in it. I select a few rows and hit the delete button. When I do the incorrect rows get deleted. What am I doing wrong here? My simple code is below.

      var LengthOfDelete:int = dgExpand.selectedIndices.length;

      for( var j:int =0; j<LengthOfDelete; j++) {
      ArrayofStructs.removeItemAt(dgExpand.selectedIndices[j]);
      }