Created
April 8, 2017 04:35
-
-
Save A2H111/c3194b413d188f035d97c1f69631abef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Method to cancel the edit mode in UIGrid | |
$scope.cancelEdit = 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 to false | |
$scope.gridOptions.data[index].editrow = false; | |
//Display Successfull message after save | |
$scope.alerts.push({ | |
msg: 'Row editing cancelled', | |
type: 'info' | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment