Skip to main content

SpreadsheetBehaviorOptions.Drag Property

Gets or sets whether the Drag operation is permitted.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

[DefaultValue(DocumentCapability.Default)]
public DocumentCapability Drag { get; set; }

Property Value

Type Default Description
DocumentCapability Default

A DocumentCapability enumeration value specifying the document’s capability to perform an operation.

Available values:

Name Description
Default

The value is determined by the current setting. The default value is automatically set if it is not explicitly specified.

Disabled

The feature is not allowed and the corresponding commands are shown disabled.

Enabled

The feature is available and the corresponding commands are shown enabled.

Hidden

The feature is not available and the corresponding commands are hidden.

Property Paths

You can access this nested property as listed below:

Object Type Path to Drag
SpreadsheetControlOptions
.Behavior .Drag

Remarks

When the Drag property is set to DocumentCapability.Disabled value, all drag operations in the SpreadsheetControl are disabled, including dragging ranges, pictures and comments. However, there are certain details concerning cell range operations which are described below.

The effect of different Drag settings on the selected range is as follows:

  • Default All drag operations are allowed. Fill handle (a small square in the lower-right corner of the selection, used to automatically fill adjacent cells with a data series) is enabled. The end-user can also move range data by dragging the selected range to another location.

    SpreadsheetBehaviorOptions.Drag.Default.MoveRange.Default.FillHandle.True

  • Enabled

    Drag operations are allowed. Fill handle and move range operations are enabled. You can use the SpreadsheetBehaviorOptions.FillHandle and SpreadsheetBehaviorOptions.MoveRange properties to disable the features individually.

    SpreadsheetBehaviorOptions.Drag.Enabled.MoveRange.Disabled.FillHandle.True

  • Disabled

    All drag operations are prohibited. If the SpreadsheetBehaviorOptions.MoveRange value is DocumentCapability.Default, the fill handle is disabled, ignoring any SpreadsheetBehaviorOptions.FillHandle value and the end-user cannot move range data by dragging the selected range to another location.

    SpreadsheetBehaviorOptions.Drag.Disabled

    However, if the MoveRange capability is set to either Enabled or Disabled, the FillHandle value is in effect.

    SpreadsheetBehaviorOptions.Drag.Disabled.MoveRange.Disabled.FillHandle.True

See Also