0

我希望当我选择网格中的所有行时不会调用事件 rowSelectionChangedBatch,我该怎么做?

$scope.gridOptions.onRegisterApi: function(gridApi) {
      gridApi.selection.on.rowSelectionChangedBatch($scope, function() {
          /* Do something */
      });
}

/* More code */
function selectAll() {
    /* After execute this, should not call the event */
    $scope.gridApi.selection.selectAllRows();
}
4

1 回答 1

0

像这样使用selectAll触发器后$event.stopPropagation();

data-ng-click="grid.appScope.selectAll(); $event.stopPropagation();"

于 2016-09-18T19:18:37.820 回答