ngGrid double click row to open pop-up for editing a row
angularjs, ng-grid
Solution
In ng-grid 2.0.11, do a simply call to ng-dblclick directive in row template
$scope.gridOptions = {
data: 'gdDtA',
rowTemplate: '<div ng-dblclick="foo(row)" ng-style="{\'cursor\': row.cursor, \'z-index\': col.zIndex() }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}" ng-cell></div>',
};
$scope.foo = function(r) {
console.log(r);
}
See in: https://github.com/angular-ui/ng-grid/wiki/Templating
Problem
How would I go about implementing a double-click event in ng-Grid? More particularly, I want the double-clicking to open a pop-up modal(Angular UI Modal) for editing. Any ideas on how to do this?