I have been looking for an example on how to implement a button to remove a selected row, but I couldn\'t find anything useful so far.
Can anyone please give me a hint?
This might help you, and also this is for deleting multiple rows in the grid.
$scope.mySelections = [];
$scope.gridOptions = {
data :'gridData',
selectedItems : $scope.mySelections,
showSelectionCheckbox : true
}
$scope.deleteSelected = function() {
angular.forEach($scope.mySelections, function(rowItem) {
$scope.gridData.splice($scope.gridData.indexOf(rowItem),1);
});
}
mySelections is the array which has selected rows