ngGridEventEndCellEdit和行索引

时间:2014-02-28 15:18:02

标签: angularjs grid

关于ngGridEventEndCellEdit(angular grid)我需要知道编辑的行的索引:我看到这个事件返回一个包含很多数据的参数但是我还没找到它! : - (

$scope.$on('ngGridEventEndCellEdit', function (data) {
    console.log(data);
});

1 个答案:

答案 0 :(得分:3)

这应该为您提供刚编辑的行的所有信息。

$scope.$on('ngGridEventEndCellEdit', function (data) {
    if (!data.targetScope.row) {
        data.targetScope.row = [];
    }
    console.log(data.targetScope.row.entity);
}