Skip to content

Instantly share code, notes, and snippets.

@A2H111
Created April 8, 2017 04:33
Show Gist options
  • Save A2H111/ece35f332268015baf6f4aa0a4f7b1cd to your computer and use it in GitHub Desktop.
Save A2H111/ece35f332268015baf6f4aa0a4f7b1cd to your computer and use it in GitHub Desktop.
//function to be called on row edit button click
//Passing the selected row object as parameter, we use this row object to identify the edited row
$scope.edit = function (row) {
//Get the index of selected row from row object
var index = $scope.gridOptions.data.indexOf(row);
//Use that to set the editrow attrbute value for seleted rows
$scope.gridOptions.data[index].editrow = !$scope.gridOptions.data[index].editrow;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment