Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

SpreadsheetBehaviorOptions.Drag Property

Gets or sets whether the Drag operation is permitted.

Namespace: DevExpress.XtraSpreadsheet

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

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.

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Drag property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also