Angular ui-grid double click row to open pop-up for editing a row

前端 未结 3 1385
孤独总比滥情好
孤独总比滥情好 2021-02-20 14:41

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

3条回答
  •  星月不相逢
    2021-02-20 15:19

    The solution with custom rowTemplate works fine. I've found a more elegant solution which adds the event to the 'ui-grid/ui-grid-row' template:

    rowTemplate : $templateCache.get('ui-grid/ui-grid-row').replace("

    The double click event handler would be something like this:

    $scope.onRowDblClick = function (row) {
        if (row && row.entity) {
            //insert your custom code
        }
    };
    

    You'll have to add the dependency to $templateCache in your controller.

提交回复
热议问题