Angle Range Row Restriction

I want to limit the selection in my ui-grid to 10. In my gridOptions I do

 onRegisterApi: function (gridApi) { $scope.gridApi = gridApi; gridApi.selection.on.rowSelectionChanged($scope, function (row) { $scope.rowsSelected = $scope.gridApi.selection.getSelectedRows(); $scope.countRows = $scope.rowsSelected.length; if ($scope.countRows === 10) { // disable option to select rows now } }); } 

but now I don’t know how to disable this option ... thanks for any help!

+2
angularjs ui-grid
source share

No one has answered this question yet.

See similar questions:

8
What is equivalent for the "beforeSelectionChange" ng grid in ui-grid?

or similar:

4523
"Thinking in AngularJS" if I have jQuery background?
3178
AngularJS: Service vs provider vs factory
1690
How does data binding work in AngularJS?
1195
How do I access the $ scope variable in the browser console using AngularJS?
1073
How to use $ scope. $ Watch and $ scope. $ Apply in AngularJS?
912
'this' vs $ scope in AngularJS controllers
637
Why does AngularJS include an empty option?
one
What is the difference when I use gridapi in the controller as follows?
0
How to access gridApi in a custom grid using $ scope?

All Articles