I'm assuming your referring to this? http://ui-grid.info/
plnkr.co/edit/ZIxtMT1CiimrafiMIha4
To one of their examples - I added:
gridApi.edit.on.afterCellEdit($scope,function(rowEntity, colDef, newValue, oldValue){
$scope.addData();
})
to onRegisterApi
and
$scope.addData = function() {
var n = $scope.gridOptions.data.length + 1;
$scope.gridOptions.data.push({
"id": n
});
};
Simply pushes a new object to the end of the dataset.
This will trigger on enter key of any row cell. Now figure out how to detect which cell was edited (hint: probably colDef)