Reputation: 2706
We enable/disable all our cells based on an external scope like so:
cellEditableCondition: function ($scope) {return $scope.getExternalScopes().view.isEditing;},
You have to include the cellNav module on the grid element witch seems to automatically enable it, like so:
<div data-ui-grid="gridOptions" class="search-grid" data-ui-grid-selection ui-grid-edit ui-grid-cellNav external-scopes="externalScopes"></div>
We want to disable cellNav when isEditing is false and allow row selection. How do we achieve this?
Upvotes: 0
Views: 759
Reputation: 51
A lot of the grid functions aren't quite so dynamic as you're imagining - cellNav is generally present or not present.
However, the way you describe it, I sort of get the impression that isEditing might be for the whole page, rather than some sort of row by row thing. If that's the case, then you're really talking about turning cellNav and row select on and off for the whole grid. If so, I'd use gridOptions.enableCellNav
and gridOptions.enableEditing
when you first render the page.
Upvotes: 0
Reputation: 333
Your Column definition should be like this
cellEditableCondition: function ($scope) {return $scope.view.isEditing;},
Upvotes: 1