2
$scope.deleteClick = function(e){
    e.preventDefault();
    var datasource = $scope.mygrid.datasource;
    var index = $(e.target).closest("tr")[0].rowIndex;
    datasource.remove(datasource.at(index -1));
}

At this code, you will see that I did DOM manipulation, because I did not get row index from parameter e. Please help me to get the row index.

livibetter
  • 19,832
  • 3
  • 42
  • 42
ttacompu
  • 873
  • 1
  • 10
  • 15

1 Answers1

1

What I can suggest you is to use the removeRow method of the Grid and just pass the TR element (you cannot avoid accessing the TR element).

grid.removeRow($(e.target).closest('tr'))
Petur Subev
  • 19,983
  • 3
  • 52
  • 68