ui-grid での選択を 10 に制限したいと思いgridOptions
ます。
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
}
});
}
しかし、今はこのオプションを無効にする方法がわかりません...助けてくれてありがとう!