ngGrid - remove row

前端 未结 6 701
猫巷女王i
猫巷女王i 2021-02-04 15:34

I have been looking for an example on how to implement a button to remove a selected row, but I couldn\'t find anything useful so far.

Can anyone please give me a hint?

6条回答
  •  后悔当初
    2021-02-04 16:25

    thanks for the hint but I tried the snippet and it doesn't work so I changed it in

    var removeTemplate = '';
    $scope.removeRow = function() {;
                        var index = this.row.rowIndex;
                        alert(index);
                        $scope.gridOptions.selectItem(index, false);
                        $scope.items.splice(index, 1);
                    };
    

    and it works like a charme :) Hope this help.

提交回复
热议问题