Greetings,
I am using the following code to successfully execute a function when a
user right-clicks on a UI Grid row. The problem is, I can't seem to figure
out how that function cal tell which row was right-clicked on. Any help
would sure be appreciated.
<div ui-grid="{ data: gridData }" right-click="rightClick()" style="height:
1000px;"></div>
.directive('rightClick', function($parse) {
return function(scope, element, attrs) {
var fn = $parse(attrs.rightClick);
element.bind('contextmenu', function(event) {
scope.$apply(function() {
event.preventDefault();
fn(scope, {$event:event});
});
});
};
})
.controller('ComponentGridController', function($scope, ComponentGridService /*
$sce, $q, $log */) {
$scope.rightClick = function () {
var x1 = 1; // I get here when the user right-clicks on a row, I
just don't know what row it is
};
});
Thanks!
Blake McBride
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.