Skip to content

Commit c592e7e

Browse files
Grids: add reordering shortcuts a11y info to demos (#29851)
1 parent d48444f commit c592e7e

File tree

3 files changed

+47
-13
lines changed

3 files changed

+47
-13
lines changed
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
DevExtreme DataGrid columns use the same display order as fields in data objects. You can use the [columns](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/) array to specify a different display order. To reorder a column at runtime, change the **column**.[visibleIndex](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#visibleIndex) property.
2-
3-
Users can drag and drop column headers to reorder columns as needed. To activate this feature, set the [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#allowColumnReordering) property to **true**. If you wish to prevent reorder operations for a given column, disable its **column**.[allowReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#allowReordering) property.
1+
DevExtreme DataGrid columns use the same display order as fields in the component's [dataSource](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#dataSource). You can specify a different display order with the [columns[]](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/) array. To reorder a column at runtime, change the **columns[]**.[visibleIndex](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#visibleIndex) property.
42
<!--split-->
53

4+
To allow users to reorder columns, set [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#allowColumnReordering) to `true`. To disable reordering operations for a specific column, assign `false` to its [allowReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#allowReordering) property.
5+
6+
Users can reorder columns with mouse drag-and-drop operations or with keyboard shortcuts:
7+
8+
- **Ctrl/Cmd+Left Arrow**
9+
Move the focused column to the left.
10+
- **Ctrl/Cmd+Right Arrow**
11+
Move the focused column to the right.
12+
13+
Reordering operations are also available in the component's context menu.
14+
615
This demo illustrates [fixed](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#fixed) column behavior during user-initiated column reorder operations. Users can drag & drop columns within the following areas (but not between them):
716

817
- Columns fixed to the left
918
- Non-fixed columns
1019
- Columns fixed to the right
1120

12-
Sticky columns (fixed with the 'sticky' [position](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#fixedPosition)) behave like non-fixed columns during reorder operations (even if they are in a state where they are attached to a border/fixed column). To see sticky columns in this demo, right-click a column to open the DataGrid’s context menu. Choose "Set Fixed Position -> Sticky" to stick a given column.
21+
Sticky columns (fixed with the 'sticky' [position](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#fixedPosition)) behave like non-fixed columns during reorder operations (even if they are in a state where they are attached to a border/fixed column). To see sticky columns in this demo, right-click a column to open the DataGrid’s context menu. Choose "Set Fixed Position -> Sticky" to stick a given column.
Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
The DataGrid allows users to group data against a single column or multiple columns.
1+
To group data by columns, users can utilize the group panel. Enable the [groupPanel](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/groupPanel/).[visible](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/groupPanel/#visible) property to display the group panel area.
2+
<!--split-->
23

3-
To group data, users can drag and drop column headers onto and from the area above the grid. This area is called the [groupPanel](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/groupPanel/). Set its **visible** property to **true** to show it.
4+
To group data, users can drag and drop column headers onto and from the group panel. DataGrid also supports keyboard shortcuts to perform grouping actions:
45

5-
Users can reorder headers within the **groupPanel** to change group hierarchy. To enable this functionality, set the [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#allowColumnReordering) property to *"true"*.
6-
<!--split-->
6+
- **Ctrl+G**
7+
Move the focused column header to the group panel.
8+
- **Backspace**, **Delete**, and **Ctrl+Shift+G**
9+
Remove the focused column header from the group panel. This shortcut is available for items in:
10+
- The group panel.
11+
- The column header if [showWhenGrouped](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#showWhenGrouped) is enabled.
12+
- **Shift+Alt+G**
13+
Ungroup all items from the group panel.
14+
15+
To allow users to reorder headers within the group panel, assign `true` to the [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#allowColumnReordering) property. Reordering headers in the group panel changes the component's group hierarchy. Users can reorder headers with mouse drag-and-drop operations or keyboard shortcuts:
16+
17+
- **Ctrl/Cmd+Left Arrow**
18+
Move the focused header to the left.
19+
- **Ctrl/Cmd+Right Arrow**
20+
Move the focused header to the right.
21+
22+
Grouping and reordering operations are also available in the component's context menu.
723

824
To group data against a single **column**, apply the [groupIndex](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/columns/#groupIndex) property to it. This property accepts a zero-based index number that controls the column order. In this example, the data is grouped against the *State* column.
925

10-
You can also use the [grouping](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/grouping/) object to specify user interaction settings related to grouping. This demo illustrates the [autoExpandAll](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/grouping/#autoExpandAll) property that specifies whether the groups appear expanded.
26+
You can also use the [grouping](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/grouping/) object to specify user interaction settings related to grouping. This demo illustrates the [autoExpandAll](/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/grouping/#autoExpandAll) property that specifies whether the groups appear expanded.
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
DevExtreme TreeList columns use the same display order as fields in data objects. You can use the [columns](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/) array to specify a different display order. To reorder a column at runtime, change the **column**.[visibleIndex](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#visibleIndex) property.
2-
3-
Users can drag and drop column headers to reorder columns as needed. To activate this feature, set the [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/#allowColumnReordering) property to **true**. If you wish to prevent reorder operations for a given column, disable its **column**.[allowReordering](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#allowReordering) property.
1+
DevExtreme DataGrid columns use the same display order as fields in the component's [dataSource](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/#dataSource). You can specify a different display order with the [columns[]](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/) array. To reorder a column at runtime, change the **columns[]**.[visibleIndex](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#visibleIndex) property.
42
<!--split-->
53

4+
To allow users to reorder columns, set [allowColumnReordering](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/#allowColumnReordering) to `true`. To disable reordering operations for a specific column, assign `false` to its [allowReordering](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#allowReordering) property.
5+
6+
Users can reorder columns with mouse drag-and-drop operations or with keyboard shortcuts:
7+
8+
- **Ctrl/Cmd+Left Arrow**
9+
Move the focused column to the left.
10+
- **Ctrl/Cmd+Right Arrow**
11+
Move the focused column to the right.
12+
13+
Reordering operations are also available in the component's context menu.
14+
615
This demo illustrates [fixed](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#fixed) column behavior during user-initiated column reorder operations. Users can drag & drop columns within the following areas (but not between them):
716

817
- Columns fixed to the left
918
- Non-fixed columns
1019
- Columns fixed to the right
1120

12-
Sticky columns (fixed with the 'sticky' [position](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#fixedPosition)) behave like non-fixed columns during reorder operations (even if they are in a state where they are attached to a border/fixed column). To see sticky columns in this demo, right-click a column to open the TreeList’s context menu. Choose "Set Fixed Position -> Sticky" to stick a given column.
21+
Sticky columns (fixed with the 'sticky' [position](/Documentation/ApiReference/UI_Components/dxTreeList/Configuration/columns/#fixedPosition)) behave like non-fixed columns during reorder operations (even if they are in a state where they are attached to a border/fixed column). To see sticky columns in this demo, right-click a column to open the TreeList’s context menu. Choose "Set Fixed Position -> Sticky" to stick a given column.

0 commit comments

Comments
 (0)