title: How can I make the clicking of a button in an ng-grid table delete a row from the model?
body: <p>I have set up the following with ng-grid:</p>
  
  <pre><code>    var gridData = {};
      $scope.gridOptions = {
          data: 'gridData',
          enableCellEdit: true,
          multiSelect: false,
          columnDefs: [
              { field: 'testId', displayName: 'Test Id' },
              { field: 'name', displayName: 'Name', enableCellEdit: true, editableCellTemplate: cellEditableTemplate },
              { field: 'description', displayName: 'Description', enableCellEdit: true, editableCellTemplate: cellEditableTemplate },
              { field: '', cellTemplate: '&lt;button ng-click="delete(row)"&gt;Delete&lt;/button&gt;' }
          ]
      };
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>   $scope.delete = function (row) {
        row.entity.$deleteData({ testId: row.entity.testId });
     }
  </code></pre>
  
  <p>This sends a HTTP message to the server which deletes the row. However the row 
  still remains in the grid. How can I make it so the click of the delete button
  on a row also deletes a row from the gridData object?</p>