Skip to main content
A newer version of this page is available. .

GridView.ClipboardDataProvider Property

Gets an object that provides data for the clipboard in a variety of formats (plain text, plain unicode text, rich text, CSV, Biff8, HTML).

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

[DXCategory("Data")]
[Browsable(false)]
public virtual GridClipboardDataProvider ClipboardDataProvider { get; }

Property Value

Type Description
GridClipboardDataProvider

An object that provides data for the clipboard in a variety of formats (plain text, plain unicode text, rich text, CSV, Biff8, HTML).

Remarks

The ClipboardDataProvider property returns a GridClipboardDataProvider class instance. This object provides data for the clipboard in a variety of 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 and will be passed to the clipboard if the user presses Ctrl+C. For example, the GridClipboardDataProvider.GetTextData method returns data for the clipboard in the plain text format.

Example

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%
See Also