title: UI-Grid Cannot read property 'data' of undefined
body: <p>Hi guys I'm trying to setup expandable grid  <a href="http://ui-grid.info/docs/#/tutorial/216_expandable_grid" rel="nofollow">http://ui-grid.info/docs/#/tutorial/216_expandable_grid</a></p>
  
  <p>But getting the error oh http request :</p>
  
  <p>TypeError: Cannot read property 'data' of undefined
      at new eval (ui-grid.js?bust=1466737921408:3164)
      at Object.invoke (angular.js?bust=1466737921408:4625)
      at $controllerInit (angular.js?bust=1466737921408:10027)
      at nodeLinkFn (angular.js?bust=1466737921408:8965)
      at eval (angular.js?bust=1466737921408:9362)
      at processQueue (angular.js?bust=1466737921408:15757)
      at eval (angular.js?bust=1466737921408:15773)
      at Scope.$eval (angular.js?bust=1466737921408:17025)
      at Scope.$digest (angular.js?bust=1466737921408:16841)
      at Scope.$apply (angular.js?bust=1466737921408:17133)</p>
  
  <p>this is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>gridOptions: {
    paginationPageSizes: [25, 50, 75],
    paginationPageSize: 25,
    expandableRowTemplate: '&lt;div ui-grid="row.entity.subGridOptions" style="width: 150px;"&gt;&lt;/div&gt;',
    onRegisterApi: function(gridApi) {
      console.log('getting here');
      gridApi.expandable.on.rowExpandedStateChanged($scope, $http, function(row) {
        console.log(row);
        if (row.isExpanded) {
          row.entity.subGridOptions = {
            columnDefs: [{
              name: 'name'
            }, {
              name: 'gender'
            }, {
              name: 'company'
            }]
          };
  
          $http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/100.json')
            .success(function(data) {
              row.entity.subGridOptions.data = data[1];
            })
            .error(function(error) {
              console.log(error);
            });
        }
      });
    }
  }</code></pre>
  </div>
  </div>
  </p>