This example is based on the following example: WinForms Data Grid - Drag-and-drop data rows from one grid to another. The example demonstrates how to implement drag-and-drop functionality between two grid controls using DevExpress WinForms MVVM framework.
To implement drag and drop using the MVVM pattern, create a helper class (DragAndDropHelper
) that implements corresponding events (Drop
, DeleteRecord
). The EventToCommand
method passes event arguments to corresponding ViewModel commands.
- DragDropForm.cs (VB: DragDropForm.vb)
- DragAndDropHelper.cs (VB: DragAndDropHelper.vb)
- File.cs (VB: File.vb)
- Repository.cs (VB: Repository.vb)
- TestView.cs (VB: TestView.vb)
- DragDropViewModel.cs (VB: DragDropViewModel.vb)
(you will be redirected to DevExpress.com to submit your response)