Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Expand]Expressions
  [Expand]Behaviors
  [Expand]Application Appearance
  [Expand]Filtering UI Context
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Menus
  [Expand]Tooltip Management
  [Expand]Saving and Restoring Layouts
   Clipboard - Copy Data and Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Clipboard - Copy Data and Formatting

Expanded Copy Data

Certain DevExpress controls allow end-users to copy the control's selected data to the Clipboard using the common CTRL+C shortcut. These controls also provide the CopyToClipboard method to perform selection copying in code.

The Data Grid control also provides additional options to control data copying operations. These options are accessible from the GridView.OptionsClipboard object.

For the Tree List control, the following additional Clipboard options are accessible from the TreeList.OptionsClipboard object.

Expanded Copy Formatting

The Copy Formatting feature, supported by the Data Grid and Tree List controls, allows end-users to copy the control's selection along with formatting settings (fonts, cell background and foreground) to the Clipboard in RTF, HTML and Biff8 (XLS) formats. When pasting this data to MS Word, MS Excel or MS Outlook, the data is pasted while preserving the original formatting. This is a cross-platform functionality, supported for Data Grid and Tree List controls for WinForms and WPF platforms.

To enable the Copy Formatting feature, set the control's ClipboardMode option (ClipboardOptions.ClipboardMode) to Formatted. For WinForms Grid and TreeList controls, this option is accessible from the GridView.OptionsClipboard and TreeList.OptionsClipboard properties, respectively.

In Formatted data copy mode, the selection is copied in multiple formats simultaneously: RTF, HTML, XLS (Biff8), CSV, UnicodeText and Text. You can disable certain formats (e.g., to improve application performance) using options available from the control's OptionsClipboard object.

The following are additional settings supported in Formatted data copy mode.
Note

The WinForms Data Grid supports the Copy Formatting feature for the following Views: GridView, BandedGridView and AdvBandedGridView.

How would you rate this topic?​​​​​​​