Spread for WPF allows you to drag and move or drag and copy column, row, and cell range data using your mouse. Use the DragDropMode enumeration to perform the drag and drop operations in a worksheet. This enumeration provides the following values:
Value | Description |
All | Drag and drop rows, columns, or selected cell ranges. |
Column | Drag and drop only column(s). |
Row | Drag and drop only row(s). |
Range | Drag and drop the selected cell range. |
None | Does not allow drag and drop any rows, columns, or selected range. |
Supported drag and drop features
The drag and drop feature enables moving and copying the following features:
Unsupported drag and drop operations
The drag and drop feature does not support the following operations:
You can drag and move the data of a selected cell range by using the mouse. To do this, move the pointer to the edge of the selected cell, column, row, or selected cell range and then click and hold the mouse button. While moving the selected range, a text tip is displayed to help show the target location. When you release the mouse button, the selected cell range is relocated to the new location.
You can drag and copy the selected cell range using the mouse. To do this, move the pointer to the edge of the selected cell range and then click and hold the mouse button while pressing the Ctrl key. While copying the range, a text tip is displayed to help show the target location. After you release the mouse button, the selected cell range is copied to the new location.
The following example code shows hot to set the drag and drop feature for a selected cell range using DragDropMode enumeration in both the XAML view and the code view.