Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetControl.BeforeDragRange Event

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

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.dll

NuGet Package: DevExpress.Win.Spreadsheet

#Declaration

public event BeforeDragRangeEventHandler BeforeDragRange

#Event Data

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

Property Description
Cancel Gets or sets whether to cancel the drag-and-drop or fill operation for the selected cell range.
DataTransferMode Returns the operation type a user performs on the selected cells.
Range Returns 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