VERSION:
I am using Angular ui-grid version 3.0.0-RC.18 (http://ui-grid.info/).
PROBLEM
I want to implement a double-c
Well, my question was answered at Github:
https://github.com/angular-ui/ng-grid/issues/2228#issuecomment-71912850
My mistake was not to use external-scopes, and try to solve the problem with ng-dblclick only.
The code should be like this:
At the Controller:
$scope.gridHandlers = {
onDblClick : function(row) {
var url = '//google.com';
$window.open(url, "_blank", "height=600,width=800,toolbar=no,location=no,menubar=no,titlebar=no");
}
}
$scope.myGridOptions = {
showFooter: false,
enableSorting: true,
multiSelect: false,
enableFiltering: true,
enableRowSelection: true,
enableSelectAll: false,
enableRowHeaderSelection: false,
enableGridMenu: true,
noUnselect: true,
onRegisterApi: function (gridApi){
$scope.gridApi = gridApi;
},
rowTemplate: ""
}
At the View:
Considering that externalScopes is no longer supported, and now appScopeProvider rules.
In the view:
In the controller:
$scope.myGridOptions = {
showFooter: false,
enableSorting: true,
multiSelect: false,
enableFiltering: true,
enableRowSelection: true,
enableSelectAll: false,
enableRowHeaderSelection: false,
enableGridMenu: true,
noUnselect: true,
onRegisterApi: function (gridApi){
$scope.gridApi = gridApi;
},
appScopeProvider: {
onDblClick : function(row) {
var url = '//google.com';
$window.open(url, "_blank", "height=600,width=800,toolbar=no,location=no,menubar=no,titlebar=no");
}
},
rowTemplate: ""
}
Here is my example at Plnkr using a modal popup (done with angular-ui-bootstrap):
http://plnkr.co/edit/cq7s9lKn90xTVgNxIC6b?p=preview
Note that if you use a newer version of ui-bootstrap, you will need to rename $modal in the above plunkr to $uibModal.