windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-487e89cd.md
Gets an object that provides data for the clipboard in various formats (plain text, plain unicode text, rich text, CSV, BIFF8, HTML).
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("Data")]
[Browsable(false)]
public virtual GridClipboardDataProvider ClipboardDataProvider { get; }
<DXCategory("Data")>
<Browsable(False)>
Public Overridable ReadOnly Property ClipboardDataProvider As GridClipboardDataProvider
| Type | Description |
|---|---|
| GridClipboardDataProvider |
An object that provides data for the clipboard in various formats (plain text, plain unicode text, rich text, CSV, BIFF8, HTML).
|
The ClipboardDataProvider property returns a GridClipboardDataProvider class instance. This object provides data to the clipboard in various formats (plain text, rich text, plain unicode text, CSV, BIFF8, HTML). Use the provider’s methods to get data that is currently selected in the control. This data is passed to the clipboard if the user presses Ctrl+C. For example, the GridClipboardDataProvider.GetTextData method returns clipboard data in plain text format.
The GridClipboardDataProvider allows you to get data that are currently selected in the grid and will be passed to the clipboard. The figure and code below show the selected rows in the control, usage of the GridClipboardDataProvider.GetCsvData method, and the returned value.
gridView1.ClipboardDataProvider.GetCsvData();
// The method returns the following value:
//
// State,Sales,Sales vs Target,Profit,Satisfaction,Market Share
// Arizona,73M,-0.94%,-4M,3.6,11%
// North Carolina,71M,-1.11%,-17M,3,12%
gridView1.ClipboardDataProvider.GetCsvData()
' The method returns the following value:
'
' State,Sales,Sales vs Target,Profit,Satisfaction,Market Share
' Arizona,73M,-0.94%,-4M,3.6,11%
' North Carolina,71M,-1.11%,-17M,3,12%
See Also