Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataGridViewClipboardCopyMode Enumeration
Collapse the table of content
Expand the table of content

DataGridViewClipboardCopyMode Enumeration

Defines constants that indicate whether content is copied from a DataGridView control to the Clipboard.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

type DataGridViewClipboardCopyMode

Member nameDescription
DisableCopying to the Clipboard is disabled.
EnableWithAutoHeaderTextThe text values of selected cells can be copied to the Clipboard. Row or column header text is included for rows or columns that contain selected cells only when the DataGridView.SelectionMode property is set to RowHeaderSelect or ColumnHeaderSelect and at least one header is selected.
EnableWithoutHeaderTextThe text values of selected cells can be copied to the Clipboard. Header text is not included.
EnableAlwaysIncludeHeaderTextThe text values of selected cells can be copied to the Clipboard. Header text is included for rows and columns that contain selected cells.

This enumeration is used by the ClipboardCopyMode property to indicate whether users can copy the text values of selected cells to the Clipboard and whether row and column header text is included.

The following code example demonstrates how to enable copying in the DataGridView control. For the complete example, see How to: Enable Users to Copy Multiple Cells to the Clipboard from the Windows Forms DataGridView Control.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft