title: ui.grid A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise
body: <p>I am using <code>ui.grid</code> and stuck with <code>celledit</code> functionality. The row gets saved in DB, but shows an error as give below.</p>
  
  <pre><code>angular.min.js:2 A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>$scope.saveRow = function( rowEntity ) {
      // create a fake promise - normally you'd use the promise returned by $http or $resource
      //var promise = $q.defer();
      ExpService.insertExp(rowEntity);
      /*console.log(rowEntity);
      $scope.gridApi.rowEdit.setSavePromise( rowEntity, promise.promise );
      promise.resolve();*/
  };
  
  $scope.gridOptions.onRegisterApi = function(gridApi) {
      // set gridApi on scope
      $scope.gridApi = gridApi;
      gridApi.rowEdit.on.saveRow($scope, $scope.saveRow);
  };
  </code></pre>
  
  <p>ExpService:</p>
  
  <pre><code>var exp={};
  exp.insertExp = function(insData){
      return $http.post(config.expInsertURL, insData).then(function(repos){
          return repos.data;
      },function(error){
          alert("Error happened while getting response \n" + error);
          return "";
      });
  }
  return exp;
  </code></pre>
  
  <p>Can anyone help me to resolve the issue? In particular, I don't understand why do we need a <code>promise</code> in that function, even after reading the <code>ui.grid</code> documentation.</p>