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!