title: Angular ui grid: Add value of selected cell to model
body: <p>I currently have a grid that I created with Angular <a href="http://ui-grid.info/" rel="nofollow">ui-grid</a> that allows the user to select a number of rows.  The first column of each row has an id number, and I would like to add the ids of the selected rows to an object in my model so that I can use those ids to query my database on the back end.  </p>
  
  <p>My problem is that I have not figured out how to access cell values, much less how to add the value of selected cells to my model.  So any help would be very much appreciated!</p>
  
  <p>Here is the code for my grid that I use in my controller</p>
  
  <pre><code>        $scope.gridOptions = {
          enablePaginationControls: false,
          enableRowSelection: true,
          enableSelectAll: true,
          paginationPageSize: 25,
          enableHorizontalScrollbar: 0,
          enableVerticalScrollbar: 0,
          columnDefs: [
              {field: 'analysis_id',displayName: 'Analysis ID',width: '15%'}, 
              {field: 'study_id', displayName: 'Study ID',width: '15%'},
              {field: 'publisher', displayName: 'Publisher',cellFilter: 'titlecase',width: '20%'},
              {field: 'parent_company', displayName: 'Parent Company', cellFilter: 'titlecase',width: '30%'}
          ]};
  
      $scope.gridOptions.onRegisterApi = function(gridApi) {
          $scope.gridApi = gridApi;
      };
  </code></pre>