Back to Devexpress

ClipboardOptions.PasteMode Property

corelibraries-devexpress-dot-export-dot-clipboardoptions-44756945.md

latest4.5 KB
Original Source

ClipboardOptions.PasteMode Property

Gets or sets data pasting mode.

Namespace : DevExpress.Export

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[DefaultValue(PasteMode.Default)]
public virtual PasteMode PasteMode { get; set; }
vb
<DefaultValue(PasteMode.Default)>
Public Overridable Property PasteMode As PasteMode

Property Value

TypeDefaultDescription
PasteModeDefault

Data pasting mode.

|

Available values:

NameDescription
Default

Data Grids: The Default mode is equivalent to None (data pasting is not allowed) for controls not in master-detail mode, and for master Views in master-detail mode. For detail Views in master-detail mode, the actual paste mode is determined by master Views.

Tree Lists: The Default mode is equivalent to None (data pasting is not allowed).

| | Append |

Pasted data is added as new rows to the target control.

For the WinForms Tree List control, use the TreeListOptionsClipboard.PasteAsChildNodes setting to specify if pasted data is inserted as the focused node’s children or siblings.

| | None |

Data pasting is disabled.

| | Update |

Pasted data updates existing cells of the target control.

|

Remarks

Note

The WinForms controls and components below do not support paste operations:

The WinForms controls contain the following events to manage and cancel data paste operations:

See Clipboard - Copy and Paste Operations. Data Formatting to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PasteMode 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.

winforms-grid-copy-paste/CS/Main.cs#L13

csharp
gridView1.OptionsSelection.MultiSelect = true;
    gridView1.OptionsClipboard.PasteMode = DevExpress.Export.PasteMode.Append;
}

winforms-grid-copy-paste/VB/Main.vb#L15

vb
gridView1.OptionsSelection.MultiSelect = True
    gridView1.OptionsClipboard.PasteMode = DevExpress.Export.PasteMode.Append
End Sub

See Also

ClipboardRowPasting

ClipboardNodePasting

PasteAsChildNodes

Clipboard

ClipboardOptions Class

ClipboardOptions Members

DevExpress.Export Namespace