@@ -15,6 +15,9 @@ By default the module will provide a row header with checkboxes that allow selec
15
15
the `enableRowHeaderSelection` gridOption to false, then the row header is hidden and a click on the row will
16
16
result in selection of that row. You can see that in this tutorial for grid1 by looking at your javascript console.
17
17
18
+ If you want to allow both clicking on the row, and also clicking on the rowHeader, you can set `enableFullRowSelection` to
19
+ true.
20
+
18
21
Setting the `multiSelect` gridOption to true will allow selecting multiple rows, setting to false will allow selection
19
22
of only one row at a time.
20
23
@@ -98,7 +101,12 @@ auto-selects the first row once the data is loaded.
98
101
$scope.toggleRow1 = function() {
99
102
$scope.gridApi.selection.toggleRowSelection($scope.gridOptions.data[0]);
100
103
};
101
-
104
+
105
+ $scope.toggleFullRowSelection = function() {
106
+ $scope.gridOptions.enableFullRowSelection = !$scope.gridOptions.enableFullRowSelection;
107
+ $scope.gridApi.core.notifyDataChange( uiGridConstants.dataChange.OPTIONS);
108
+ };
109
+
102
110
$scope.setSelectable = function() {
103
111
$scope.gridApi.selection.clearSelectedRows();
104
112
@@ -174,6 +182,7 @@ auto-selects the first row once the data is loaded.
174
182
<button type="button" class="btn btn-success" ng-disabled="!gridApi.grid.options.multiSelect" ng-click="selectAll()">Select All</button>
175
183
<button type="button" class="btn btn-success" ng-click="clearAll()">Clear All</button>
176
184
<button type="button" class="btn btn-success" ng-click="setSelectable()">Set Selectable</button>
185
+ <button type="button" class="btn btn-success" ng-click="toggleFullRowSelection()">Toggle full row selection</button>
177
186
<br/>
178
187
179
188
<div ui-grid="gridOptions" ui-grid-selection class="grid"></div>
0 commit comments