ngGrid - remove row

前端 未结 6 723
猫巷女王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:21

    That is not a proper way to delete any row

    Try like this:

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

    PLUNKER --> Its working and tested

提交回复
热议问题