Back to Devexpress

SpreadsheetControl.BeforeDragRange Event

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-48fbf249.md

latest3.2 KB
Original Source

SpreadsheetControl.BeforeDragRange Event

Occurs when a user starts to drag the selected cell range.

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public event BeforeDragRangeEventHandler BeforeDragRange
vb
Public Event BeforeDragRange As BeforeDragRangeEventHandler

Event Data

The BeforeDragRange event's data class is BeforeDragRangeEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets whether to cancel the drag-and-drop or fill operation for the selected cell range.
DataTransferModeReturns the operation type a user performs on the selected cells.
RangeReturns a cell range a user starts to drag.

Remarks

Handle the BeforeDragRange event to perform any actions when a user starts to drag a cell range in a worksheet. This event occurs first in a sequence of events related to the drag-and-drop and fill operations.

The following table lists events that can fire depending on the operation type (DataTransferMode):

|

Operation Type

|

Events

| | --- | --- | |

DragDrop

|

| |

Fill

|

|

Set the event’s Cancel parameter to true to cancel the drag operation.

See Also

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace