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
Copy file name to clipboardExpand all lines: docs/grid/configuration.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2444,6 +2444,10 @@ The list of the shortcut keys for editing:
2444
2444
<td><b>Escape</b></td>
2445
2445
<td>close the editor of the selected cell without saving</td>
2446
2446
</tr>
2447
+
<tr>
2448
+
<td><b>Delete</b></td>
2449
+
<td>clears the data in the selected cells. Works only with the <a href="../usage_blockselection/#keyboard-navigation">`BlockSelection` module</a> in the "range" mode</td>
Copy file name to clipboardExpand all lines: docs/grid/usage_blockselection.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,14 +119,41 @@ The main points of cell selection while using the `BlockSelection` module are gi
119
119
120
120
### Keyboard navigation
121
121
122
-
The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets:
122
+
:::note
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
+
:::
125
+
126
+
- The module supports keyboard navigation for selecting and managing ranges, similar to keyboard navigation used in Google Spreadsheets:
123
127
- **Arrows** (`ArrowUp`, `ArrowDown`, `ArrowLeft`, `ArrowRight`): moves the focus to the adjacent cell, setting the initially selected cell if no selection is active.
124
128
- **Shift + Arrows**: extends the selected range from the current initial cell in the direction of the pressed arrow.
125
129
- **Ctrl + Arrows**: extends the selected range to the last cell in the direction of the pressed arrow.
126
130
127
-
The **Shift + click** combination is also available. It sets the end cell of the range, extending the selection from the current initial cell.
131
+
-The **Shift + click** combination sets the end cell of the range, extending the selection from the current initial cell.
128
132
129
-
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).
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
+
It is possible to cancel the cells clearing by using the [`beforeKeyDown`](grid/api/grid_beforekeydown_event.md) event:
135
+
136
+
~~~jsx
137
+
constgrid=newdhx.Grid("grid_container", {
138
+
columns: [
139
+
{ id:"country", header: [{ text:"Country" }] },
140
+
// The data of the cells in the "population" column will not be cleared
0 commit comments