Back to Devexpress

DataControlBase.ClipboardCopyMode Property

wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-5fc6594b.md

latest2.4 KB
Original Source

DataControlBase.ClipboardCopyMode Property

Gets or sets how data is copied to the clipboard. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ClipboardCopyMode ClipboardCopyMode { get; set; }
vb
Public Property ClipboardCopyMode As ClipboardCopyMode

Property Value

TypeDescription
ClipboardCopyMode

A ClipboardCopyMode enumeration value that specifies the copy mode.

|

Available values:

NameDescription
Default

Copying the grid data to the clipboard is allowed. Column headers will be included in the clipboard copy.

| | None |

Copying the grid data to the clipboard is blocked.

| | ExcludeHeader |

Copying the grid data to the clipboard is allowed. Column headers will be excluded from the clipboard copy.

| | IncludeHeader |

Copying the grid data to the clipboard is allowed. Column headers will be included in the clipboard copy.

|

Remarks

The following code sample demonstrates how to copy data without column headers:

xaml
<dxg:GridControl ClipboardCopyMode="ExcludeHeader">
   <dxg:GridControl.View>
      <dxg:TableView />
   </dxg:GridControl.View>
</dxg:GridControl>

If the ClipboardCopyMode property is set to ClipboardCopyMode.Default or ClipboardCopyMode.IncludeHeader, the clipboard copy includes column headers.

Set the ClipboardCopyMode property to ClipboardCopyMode.None to prevent copying to the clipboard.

See Also

Copy Operations

DataControlBase Class

DataControlBase Members

DevExpress.Xpf.Grid Namespace