Skip to content

Commit b441368

Browse files
Implementation Details
1 parent c9d5316 commit b441368

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@
55
<!-- default badges end -->
66
# DataGrid for DevExtreme - How to drag multiple rows
77

8-
This example demonstrates how to drag and drop multiple selected rows at once.
8+
This example demonstrates how to simultaneously drag and drop multiple selected rows.
99

1010
![grid-drag-multiple-rows](https://user-images.githubusercontent.com/13280527/226650938-08e5b3df-c543-4c56-b06c-aa4b97e8dd17.gif)
1111

12-
This implementation includes solutions for both local and remote data sources. It is based on our demos which illustrate how to drag a single row:
12+
This implementation includes solutions for both local and remote data sources. It is based on our demos that illustrate how to drag a single row:
1313
- [Demo: Local Reordering](https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/LocalReordering/jQuery/Light/)
1414
- [Demo: Remote Reordering](https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/RemoteReordering/jQuery/Light/)
1515

16-
describe an alternative for backend batch implementation
16+
The implementation for remote data sources sends multiple requests to update the order index of every dropped row. If your back-end supports batch updates, you can simultaneously send all data updates in a custom way.
1717

18+
## Implementation Details
19+
20+
Use the [DataGrid.rowDragging](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/rowDragging/) object to configure the drag and drop functionality:
21+
1) Handle the [RowDragging.onDragStart](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/rowDragging/#onDragStart) event to collect selected rows and cancel the drag operation if a user attempts to drag non-selected rows.
22+
2) Handle the [RowDragging.onDragChange](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/rowDragging/#onDragChange) event to cancel the drop operation if a user attempts to drop rows to the same position.
23+
3) Handle the [RowDragging.onReorder](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/rowDragging/#onReorder) event to re-order rows in the data source.
24+
4) Define [RowDragging.dragTemplate](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/rowDragging/#dragTemplate) to arrange cell values of selected rows for the dragged item.
1825

1926
## Files to Review
2027

0 commit comments

Comments
 (0)