title: How to get selected rows id in ng-grid(AngularJS)
body: <p>I wish deleted selected rows.so i want to get selected ids </p>
  
  <pre><code> $scope.gridOptions = {
      data: 'myData',
      enablePaging: true,
      showSelectionCheckbox :true,
      resizable :true,
      showFooter: true,
      multiSelect: true,
      selectedItems:$scope.mySelections,
      totalServerItems:'totalServerItems',
      pagingOptions: $scope.pagingOptions,
      filterOptions: $scope.filterOptions,
      afterSelectionChange: function () {
        $scope.selectedIDs = []; 
        angular.forEach($scope.mySelections, function ( item ) {
            $scope.selectedIDs.push(item.ID);
        });
      },
  columnDefs: [
                 { field: 'iSchl_Id', displayName: 'ID' },
                 { field: 'vSchl_Name', displayName: 'School Name' },
                 { field: 'vCity', displayName: 'City' },
                 { field: 'vState', displayName: 'State' },
                 { field: 'vCountry', displayName: 'Country' },
                 { field: 'vEmail', displayName: 'Email' },
                 { field: 'iStatus', displayName: 'Status' },
         { field: '', cellTemplate: '&lt;button ng-click="edit(row.entity)" title="Edit" class="icon-edit edt-btn"&gt;&lt;/button&gt;&lt;button ng-click="delete(row.entity)" title="Delete" class="icon-trash dlt-btn"&gt;&lt;/button&gt;',displayName: 'Action'}
      ],
  };
  </code></pre>
  
  <p>I have used dynamic data in grid.I have tried <a href="https://stackoverflow.com/questions/16911156/how-to-get-the-cell-value-from-ng-grid">How to get the cell value from ng-grid</a> Example but i not getting selectedIDs.I getting error: item are not defined</p>
  
  <p>Deleteall function  :</p>
  
  <pre><code>$scope.deleteall = function() {
       var verify=confirm('Are you sure to want this delete all selected record?');
        if(verify==true)
        {
             //Please give me logic of selected ids
        }
      };
  </code></pre>