You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Shortcut keysfor moving selection between cells
3025
3025
3026
-
In case you want to enable the arrow keys that allow moving the selection between cells, you need to specify the [`selection`](grid/api/grid_selection_config.md) property for Grid.
3026
+
In case you want to enable the shortcut keys that allow moving the selection between cells, you need to specify the [`selection`](grid/api/grid_selection_config.md) property for Grid.
3027
3027
3028
3028
~~~jsx {6}
3029
3029
constgrid=newdhx.Grid("grid_container", {
@@ -3038,95 +3038,95 @@ const grid = new dhx.Grid("grid_container", {
The list of the shortcut keys and their combinations used for moving selection between cells is the following:
3042
3042
3043
3043
<table>
3044
3044
<tbody>
3045
3045
<tr>
3046
3046
<td><b>ArrowUp</b></td>
3047
-
<td>move selection to the previous vertical cell</td>
3047
+
<td>moves selection to the previous vertical cell</td>
3048
3048
</tr>
3049
3049
<tr>
3050
3050
<td><b>ArrowDown</b></td>
3051
-
<td>move selection to the next vertical cell</td>
3051
+
<td>moves selection to the next vertical cell</td>
3052
3052
</tr>
3053
3053
<tr>
3054
3054
<td><b>ArrowLeft</b></td>
3055
-
<td>move selection to the previous horizontal cell</td>
3055
+
<td>moves selection to the previous horizontal cell</td>
3056
3056
</tr>
3057
3057
<tr>
3058
3058
<td><b>ArrowRight</b></td>
3059
-
<td>move selection to the next horizontal cell</td>
3059
+
<td>moves selection to the next horizontal cell</td>
3060
3060
</tr>
3061
3061
<tr>
3062
3062
<td><b>Ctrl+ArrowUp</b></td>
3063
-
<td>move selection to the first vertical cell</td>
3063
+
<td>moves selection to the first vertical cell</td>
3064
3064
</tr>
3065
3065
<tr>
3066
3066
<td><b>Ctrl+ArrowDown</b></td>
3067
-
<td>move selection to the last vertical cell</td>
3067
+
<td>moves selection to the last vertical cell</td>
3068
3068
</tr>
3069
3069
<tr>
3070
3070
<td><b>Ctrl+ArrowLeft</b></td>
3071
-
<td>move selection to the first horizontal cell</td>
3071
+
<td>moves selection to the first horizontal cell</td>
3072
3072
</tr>
3073
3073
<tr>
3074
3074
<td><b>Ctrl+ArrowRight</b></td>
3075
-
<td>move selection to the last horizontal cell</td>
3075
+
<td>moves selection to the last horizontal cell</td>
3076
3076
</tr>
3077
3077
<tr>
3078
3078
<td><b>Tab</b></td>
3079
-
<td>move selection to the next horizontal cell or the first cell of the next row</td>
3079
+
<td>moves selection to the next horizontal cell or the first cell of the next row</td>
3080
3080
</tr>
3081
3081
<tr>
3082
3082
<td><b>Shit+Tab</b></td>
3083
-
<td>move selection to the previous horizontal cell or to the first cell of the previous row</td>
3083
+
<td>moves selection to the previous horizontal cell or to the first cell of the previous row</td>
3084
3084
</tr>
3085
3085
</tbody>
3086
3086
</table>
3087
3087
3088
-
The arrow shortcut keys listed below do not work when the `selection` property is set to *"complex"*. Use another mode (*"cell" or "row"*) in case you want to activate these navigation keys:
3088
+
The combinations of the shortcut keys listed below do not work when the `selection` property is set to *"complex"*. Use another mode (*"cell" or "row"*) in case you want to activate these navigation keys:
3089
3089
3090
3090
<table>
3091
3091
<tbody>
3092
3092
<tr>
3093
3093
<td><b>Shift+ArrowUp</b></td>
3094
-
<td>move selection to the previous vertical cell with the change of the selected cells</td>
3094
+
<td>moves selection to the previous vertical cell with the change of the selected cells</td>
3095
3095
</tr>
3096
3096
<tr>
3097
3097
<td><b>Shift+ArrowDown</b></td>
3098
-
<td>move selection to the next vertical cell with the change of the selected cells</td>
3098
+
<td>moves selection to the next vertical cell with the change of the selected cells</td>
3099
3099
</tr>
3100
3100
<tr>
3101
3101
<td><b>Shift+ArrowLeft</b></td>
3102
-
<td>move selection to the previous horizontal cell with the change of the selected cells</td>
3102
+
<td>moves selection to the previous horizontal cell with the change of the selected cells</td>
3103
3103
</tr>
3104
3104
<tr>
3105
3105
<td><b>Shift+ArrowRight</b></td>
3106
-
<td>move selection to the next horizontal cell with the change of the selected cells</td>
3106
+
<td>moves selection to the next horizontal cell with the change of the selected cells</td>
3107
3107
</tr>
3108
3108
<tr>
3109
3109
<td><b>Ctrl+Shift+ArrowUp</b></td>
3110
-
<td>move selection to the first vertical cell with the change of the selected cells</td>
3110
+
<td>moves selection to the first vertical cell with the change of the selected cells</td>
3111
3111
</tr>
3112
3112
<tr>
3113
3113
<td><b>Ctrl+Shift+ArrowDown</b></td>
3114
-
<td>move selection to the last vertical cell with the change of the selected cells</td>
3114
+
<td>moves selection to the last vertical cell with the change of the selected cells</td>
3115
3115
</tr>
3116
3116
<tr>
3117
3117
<td><b>Ctrl+Shift+ArrowLeft</b></td>
3118
-
<td>move selection to the first horizontal cell with the change of the selected cells</td>
3118
+
<td>moves selection to the first horizontal cell with the change of the selected cells</td>
3119
3119
</tr>
3120
3120
<tr>
3121
3121
<td><b>Ctrl+Shift+ArrowRight</b></td>
3122
-
<td>move selection to the last horizontal cell with the change of the selected cells</td>
3122
+
<td>moves selection to the last horizontal cell with the change of the selected cells</td>
3123
3123
</tr>
3124
3124
</tbody>
3125
3125
</table>
3126
3126
3127
3127
### Shortcut keys for editing
3128
3128
3129
-
It is also possible to use shortcut keys for editing a cell in Grid by setting [`editable:true`](grid/api/grid_editable_config.md) property in the configuration object of Grid.
3129
+
It is possible to use shortcut keys for editing a cell in Grid by setting the [`editable:true`](grid/api/grid_editable_config.md) property in the configuration object of Grid.
3130
3130
3131
3131
~~~jsx {7}
3132
3132
constgrid=newdhx.Grid("grid_container", {
@@ -3142,17 +3142,17 @@ const grid = new dhx.Grid("grid_container", {
The list of the shortcut keys for editing is given below:
3146
3146
3147
3147
<table>
3148
3148
<tbody>
3149
3149
<tr>
3150
3150
<td><b>Enter</b></td>
3151
-
<td>open the editor in the selected cell. If the editor is currently opened -close the editor and save changes</td>
3151
+
<td>opens the editor in the selected cell. If the editor is currently opened -closes the editor and saves changes</td>
3152
3152
</tr>
3153
3153
<tr>
3154
3154
<td><b>Escape</b></td>
3155
-
<td>close the editor of the selected cell without saving</td>
3155
+
<td>closes the editor of the selected cell without saving</td>
3156
3156
</tr>
3157
3157
<tr>
3158
3158
<td><b>Delete</b></td>
@@ -3161,20 +3161,103 @@ The list of the shortcut keys for editing:
3161
3161
</tbody>
3162
3162
</table>
3163
3163
3164
-
### Selecting ranges of cells
3164
+
### Shortcut keys for selecting ranges of cells
3165
3165
3166
3166
If you need to use the keyboard navigation for selecting ranges of cells via the user interface, you should enable the [`BlockSelection`](grid/usage_blockselection.md) modulein the Grid configuration.
3167
3167
3168
3168
:::note
3169
3169
Keyboard navigation works in both the `"range"` and `"manual"`modes. In the `"manual"` mode, applying the selection (e.g., after `Enter`) requires handling via the events, such as [`beforeBlockSelectionApply`](grid/api/blockselection/beforeblockselectionapply_event.md) and [`afterBlockSelectionApply`](grid/api/blockselection/afterblockselectionapply_event.md).
3170
3170
:::
3171
3171
3172
-
- The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets:
3173
-
-**Arrows** (`ArrowUp`, `ArrowDown`, `ArrowLeft`, `ArrowRight`): moves the focus to the adjacent cell, setting the initially selected cell if no selection is active.
3174
-
-**Shift + Arrows**:extends the selected range from the current initial cell in the direction of the pressed arrow.
3175
-
-**Ctrl + Arrows**:extends the selected range to the last cell in the direction of the pressed arrow.
3172
+
The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets. The following shortcut keys and their combinations are available:
3176
3173
3177
-
- The **Shift + click** combination sets the end cell of the range, extending the selection from the current initial cell.
3174
+
<table>
3175
+
<tbody>
3176
+
<tr>
3177
+
<td><b>ArrowUp</b></td>
3178
+
<td>resets the selected range and moves the focus to the previous vertical cell, setting the initially selected cell if no selection is active</td>
3179
+
</tr>
3180
+
<tr>
3181
+
<td><b>ArrowDown</b></td>
3182
+
<td>resets the selected range and moves the focus to the next vertical cell, setting the initially selected cell if no selection is active</td>
3183
+
</tr>
3184
+
<tr>
3185
+
<td><b>ArrowLeft</b></td>
3186
+
<td>resets the selected range and moves the focus to the previous horizontal cell, setting the initially selected cell if no selection is active</td>
3187
+
</tr>
3188
+
<tr>
3189
+
<td><b>ArrowRight</b></td>
3190
+
<td>resets the selected range and moves the focus to the next horizontal cell, setting the initially selected cell if no selection is active</td>
3191
+
</tr>
3192
+
<tr>
3193
+
<td><b>Shift+ArrowUp</b></td>
3194
+
<td>extends the selected range from the current initial cell to the previous vertical cell</td>
3195
+
</tr>
3196
+
<tr>
3197
+
<td><b>Shift+ArrowDown</b></td>
3198
+
<td>extends the selected range from the current initial cell to the next vertical cell </td>
3199
+
</tr>
3200
+
<tr>
3201
+
<td><b>Shift+ArrowLeft</b></td>
3202
+
<td>extends the selected range from the current initial cell to the previous horizontal cell </td>
3203
+
</tr>
3204
+
<tr>
3205
+
<td><b>Shift+ArrowRight</b></td>
3206
+
<td>extends the selected range from the current initial cell to the next horizontal cell </td>
3207
+
</tr>
3208
+
<tr>
3209
+
<td><b>Ctrl+ArrowUp</b></td>
3210
+
<td>resets the selected range and moves the focus to the first vertical cell</td>
3211
+
</tr>
3212
+
<tr>
3213
+
<td><b>Ctrl+ArrowDown</b></td>
3214
+
<td>resets the selected range and moves the focus to the last vertical cell</td>
3215
+
</tr>
3216
+
<tr>
3217
+
<td><b>Ctrl+ArrowLeft</b></td>
3218
+
<td>resets the selected range and moves the focus to the first horizontal cell</td>
3219
+
</tr>
3220
+
<tr>
3221
+
<td><b>Ctrl+ArrowRight</b></td>
3222
+
<td>resets the selected range and moves the focus to the last horizontal cell</td>
3223
+
</tr>
3224
+
<tr>
3225
+
<td><b>Ctrl+Shift+ArrowUp</b></td>
3226
+
<td>extends the selected range to the first vertical cell</td>
3227
+
</tr>
3228
+
<tr>
3229
+
<td><b>Ctrl+Shift+ArrowDown</b></td>
3230
+
<td>extends the selected range to the last vertical cell</td>
3231
+
</tr>
3232
+
<tr>
3233
+
<td><b>Ctrl+Shift+ArrowLeft</b></td>
3234
+
<td>extends the selected range to the first horizontal cell</td>
3235
+
</tr>
3236
+
<tr>
3237
+
<td><b>Ctrl+Shift+ArrowRight</b></td>
3238
+
<td>extends the selected range to the last horizontal cell</td>
3239
+
</tr>
3240
+
</tbody>
3241
+
</table>
3242
+
3243
+
The following shortcut key and mouse combination is available:
3244
+
3245
+
<table>
3246
+
<tbody>
3247
+
<tr>
3248
+
<td><b>Shift + click</b></td>
3249
+
<td>sets the end cell of the range, extending the selection from the current initial cell</td>
3250
+
</tr>
3251
+
</tbody>
3252
+
</table>
3178
3253
3179
-
-The **Delete** shortcut key allows clearing the selected cells when the [`editable` mode](grid/api/grid_editable_config.md) is set for the Grid component and the `BlockSelection`module is used in the `"range"` mode.
3254
+
The following shortcut key is available when the [`editable` mode](grid/api/grid_editable_config.md) is set for the Grid component and the `BlockSelection`module is used in the `"range"` mode:
Copy file name to clipboardExpand all lines: docs/grid/usage_blockselection.md
+92-7Lines changed: 92 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -123,14 +123,99 @@ The main points of cell selection while using the `BlockSelection` module are gi
123
123
Keyboard navigation works in both the `"range"` and `"manual"` modes. In the `"manual"` mode, applying the selection (e.g., after `Enter`) requires handling via the events, such as [`beforeBlockSelectionApply`](grid/api/blockselection/beforeblockselectionapply_event.md) and [`afterBlockSelectionApply`](grid/api/blockselection/afterblockselectionapply_event.md).
124
124
:::
125
125
126
-
- The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets:
127
-
- **Arrows** (`ArrowUp`, `ArrowDown`, `ArrowLeft`, `ArrowRight`): moves the focus to the adjacent cell, setting the initially selected cell if no selection is active.
128
-
- **Shift + Arrows**: extends the selected range from the current initial cell in the direction of the pressed arrow.
129
-
- **Ctrl + Arrows**: extends the selected range to the last cell in the direction of the pressed arrow.
126
+
The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets. The following shortcut keys and their combinations are available:
127
+
128
+
<table>
129
+
<tbody>
130
+
<tr>
131
+
<td><b>ArrowUp</b></td>
132
+
<td>resets the selected range and moves the focus to the previous vertical cell, setting the initially selected cell if no selection is active</td>
133
+
</tr>
134
+
<tr>
135
+
<td><b>ArrowDown</b></td>
136
+
<td>resets the selected range and moves the focus to the next vertical cell, setting the initially selected cell if no selection is active</td>
137
+
</tr>
138
+
<tr>
139
+
<td><b>ArrowLeft</b></td>
140
+
<td>resets the selected range and moves the focus to the previous horizontal cell, setting the initially selected cell if no selection is active</td>
141
+
</tr>
142
+
<tr>
143
+
<td><b>ArrowRight</b></td>
144
+
<td>resets the selected range and moves the focus to the next horizontal cell, setting the initially selected cell if no selection is active</td>
145
+
</tr>
146
+
<tr>
147
+
<td><b>Shift+ArrowUp</b></td>
148
+
<td>extends the selected range from the current initial cell to the previous vertical cell</td>
149
+
</tr>
150
+
<tr>
151
+
<td><b>Shift+ArrowDown</b></td>
152
+
<td>extends the selected range from the current initial cell to the next vertical cell </td>
153
+
</tr>
154
+
<tr>
155
+
<td><b>Shift+ArrowLeft</b></td>
156
+
<td>extends the selected range from the current initial cell to the previous horizontal cell </td>
157
+
</tr>
158
+
<tr>
159
+
<td><b>Shift+ArrowRight</b></td>
160
+
<td>extends the selected range from the current initial cell to the next horizontal cell </td>
161
+
</tr>
162
+
<tr>
163
+
<td><b>Ctrl+ArrowUp</b></td>
164
+
<td>resets the selected range and moves the focus to the first vertical cell</td>
165
+
</tr>
166
+
<tr>
167
+
<td><b>Ctrl+ArrowDown</b></td>
168
+
<td>resets the selected range and moves the focus to the last vertical cell</td>
169
+
</tr>
170
+
<tr>
171
+
<td><b>Ctrl+ArrowLeft</b></td>
172
+
<td>resets the selected range and moves the focus to the first horizontal cell</td>
173
+
</tr>
174
+
<tr>
175
+
<td><b>Ctrl+ArrowRight</b></td>
176
+
<td>resets the selected range and moves the focus to the last horizontal cell</td>
177
+
</tr>
178
+
<tr>
179
+
<td><b>Ctrl+Shift+ArrowUp</b></td>
180
+
<td>extends the selected range to the first vertical cell</td>
181
+
</tr>
182
+
<tr>
183
+
<td><b>Ctrl+Shift+ArrowDown</b></td>
184
+
<td>extends the selected range to the last vertical cell</td>
185
+
</tr>
186
+
<tr>
187
+
<td><b>Ctrl+Shift+ArrowLeft</b></td>
188
+
<td> extends the selected range to the first horizontal cell</td>
189
+
</tr>
190
+
<tr>
191
+
<td><b>Ctrl+Shift+ArrowRight</b></td>
192
+
<td> extends the selected range to the last horizontal cell</td>
193
+
</tr>
194
+
</tbody>
195
+
</table>
196
+
197
+
The following shortcut key and mouse combination is available:
198
+
199
+
<table>
200
+
<tbody>
201
+
<tr>
202
+
<td><b>Shift + click</b></td>
203
+
<td>sets the end cell of the range, extending the selection from the current initial cell</td>
204
+
</tr>
205
+
</tbody>
206
+
</table>
207
+
208
+
The following shortcut key is available when the [`editable` mode](grid/api/grid_editable_config.md) is set for the Grid component and the `BlockSelection` module is used in the `"range"` mode:
209
+
210
+
<table>
211
+
<tbody>
212
+
<tr>
213
+
<td><b>Delete</b></td>
214
+
<td>allows clearing the selected cells</td>
215
+
</tr>
216
+
</tbody>
217
+
</table>
130
218
131
-
- The **Shift + click** combination sets the end cell of the range, extending the selection from the current initial cell.
132
-
133
-
- The **Delete** shortcut key allows clearing the selected cells when the [`editable` mode](grid/api/grid_editable_config.md) is set for the Grid component and the `BlockSelection` module is used in the `"range"` mode.
134
219
It is possible to cancel the cells clearing by using the [`beforeKeyDown`](grid/api/grid_beforekeydown_event.md) event:
0 commit comments