|
6 | 6 |
|
7 | 7 | There are 2 ways to configure selecting rows: |
8 | 8 | - using the ```Selectable``` method of the ```GridODataClient``` object |
9 | | -- using the ```SetCheckboxColumn``` method on the column definition |
| 9 | +- using the ```SetCheckboxColumn``` or ```SetSingleCheckboxColumn``` methods on the column definition |
10 | 10 |
|
11 | 11 | ## Selectable method |
12 | 12 |
|
@@ -104,7 +104,7 @@ It's also mandatory to identify the columns that are primary keys for the grid. |
104 | 104 | - expression: it's a ```Func<T, bool>``` to define the initial value of the checkbox for each row |
105 | 105 | - readonlyExpr (optional): it's a ```Func<T, bool>``` to configure the checkbox for each row as read only |
106 | 106 |
|
107 | | -**Important:** ```CheckedRows``` pr0perty is not available since release 1.6.2. ```CheckedRows``` only allowed to retrieve the checked values, but not to change them. Use the ```Checkboxes``` property instead of it. |
| 107 | +**Important:** ```CheckedRows``` property is not available since release 1.6.2. ```CheckedRows``` only allowed to retrieve the checked values, but not to change them. Use the ```Checkboxes``` property instead of it. |
108 | 108 |
|
109 | 109 | If you want to retrieve or change the checked values for each row, you can use the ```Checkboxes``` property of the ```GridComponent``` object. |
110 | 110 | It is a dictionary that contains references to all checkbox components for each column. |
@@ -137,4 +137,21 @@ This is an example of grid using ```SetCheckboxColumn```: |
137 | 137 |
|
138 | 138 |  |
139 | 139 |
|
| 140 | +## SetSingleCheckboxColumn method |
| 141 | + |
| 142 | +This case is very similar to the previous one, with the exception of only one checkbox selected at a time. |
| 143 | +When you select a checkbox, any other checkboxes are automatically unchecked. |
| 144 | + |
| 145 | +You can add one or more columns with checkboxes on each row. |
| 146 | + |
| 147 | +```c# |
| 148 | + c.Add("CheckboxColumn").SetSingleCheckboxColumn(); |
| 149 | + c.Add(o => o.OrderID).SetPrimaryKey(true); |
| 150 | +``` |
| 151 | +Columns defined in this way must be not connected ones (defined with ```Add()``` method). But they can have a name (defined with ```Add("columnName")``` method). |
| 152 | + |
| 153 | +It's also mandatory to identify the columns that are primary keys for the grid. You must do it using the ```SetPrimaryKey(true)``` method for the primary key columns' definitions. |
| 154 | + |
| 155 | +```SetSingleCheckboxColumn``` method has no parameters. |
| 156 | + |
140 | 157 | [<- Grouping](Grouping.md) | [Searching ->](Searching.md) |
0 commit comments