title: Using an ng-option dropdown in a ui-grid editableCellTemplate [ng-grid 3.x]
body: <p>I'm using ng-grid's new 3.0 release <strong><a href="http://ui-grid.info/" rel="nofollow noreferrer">ui-grid</a></strong> to make a grid in my application. What i'm trying to do is make one of the editable cells in my table an <a href="https://docs.angularjs.org/api/ng/directive/select" rel="nofollow noreferrer">ng-options</a> dropdown that is filled with data retrieved with an angular factory.</p>
  <p>I'm trying to do this by using the <a href="http://ui-grid.info/docs/#/tutorial/201_editable" rel="nofollow noreferrer">editableCellTemplate</a> feature of the ui-grid.</p>
  <p>Here is some example code:</p>
  <p>HTML:</p>
  <pre><code>&lt;div ui-grid=&quot;gridOptions&quot; ui-grid-edit class=&quot;grid&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Controller:</p>
  <pre><code>$scope.gridOptions = {
      enableSorting: true,
      enableFiltering: true,
      enableCellEditOnFocus: true,
      columnDefs: [
        { field: 'name',
          sort: {
            direction: 'desc',
            priority: 1
          }
        },
        { field: 'gender', editType: 'dropdown', enableCellEdit: true,
            editableCellTemplate: 'temp.html' },
        { field: 'company', enableSorting: false }
  ]};
  </code></pre>
  <p>temp.html:</p>
  <pre><code>&lt;div&gt;
      &lt;select ng-model=&quot;row.entity.gender&quot; data-ng-options=&quot;d as d.type for d in genderType&quot;&gt;
          &lt;option value=&quot;&quot; selected disabled&gt;Choose Gender&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here is a <a href="http://plnkr.co/edit/7IJ7WedbjEGHkxBOtNJn?p=preview" rel="nofollow noreferrer">plunker</a> with the code. [<strong>Note:</strong> this is just example code. Array for ng-options is being pulled in from angular factory in actual code and not declared in scope. editDropdownOptionsArray will probably not work because data is dynamic.]</p>
  <p>Is it possible to do this with ui-grid? I thought maybe it was an issue of scope because if  I would put the ng-option code in my HTML page it worked as expected, but what I can gather from ui-grid documentation is that the temp.html file should be in the scope. I know this stuff is still in unstable release, but any help on the matter would be appreciated!</p>
  <hr>
  **UPDATE 3/31/2015:**
  <p>Just a note if you are trying out this solution and it doesn't work. In January the code for external scopes was refactored from <code>getExternalScopes()</code> to <code>grid.addScope.source</code>. <a href="https://github.com/angular-ui/ng-grid/issues/1379" rel="nofollow noreferrer">https://github.com/angular-ui/ng-grid/issues/1379</a></p>
  <p>Here's the updated plunkr with the new code: <a href="http://plnkr.co/edit/esWC752y8QARgQkDMaC9?p=preview" rel="nofollow noreferrer">Click Me!</a></p>