Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Collapse]Visual Elements
     Workbook
     Worksheet
    [Collapse]Cells and Cell Ranges
      Clipboard Operations
      Cell Formatting
      Conditional Formatting
      Custom Draw
     Rows and Columns
     Formulas
     Name Box
     Pictures
     Pop-Up Menus
    [Expand]Dialogs
    Services
   [Expand]Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Clipboard Operations

The SpreadsheetControl enables the use of Cut, Copy and Paste commands to copy and paste cell content, or specific attributes of a cell. To enable end-users to perform Clipboard operations, add the Clipboard Ribbon page group to the SpreadsheetControl. To see an example on how to provide a Ribbon UI for the SpreadsheetControl, refer to the Getting Started topic.

The table below lists end-user capabilities to cut, copy and paste cell content via the Ribbon UI and the spreadsheet context menu. You can also copy data from one cell to another in code by using the Range.CopyFrom method. Pass the source cell object and the required value of the PasteSpecial enumerator as parameters. For an example, refer to the How to: Copy Cell Data Only, Cell Style Only, or Cell Data with Style topic.

Operation

How to implement the operation via the Ribbon UI

How to implement the operation via the context menu

Cut cell content

In the Clipboard group, click the Cut button, or press CTRL+X or SHIFT+DELETE.

Right-click the cell you wish to move and select the Cut item in the context menu.

Copy cell content

In the Clipbord group, click the Copy button, or press CTRL+C or CTRL+INSERT.

Right-click the cell you wish to copy and select the Copy item in the context menu.

Paste cell content

  • In the Clipboard group, click the Paste button, or press CTRL+V or SHIFT+INSERT.

  • To choose special options when pasting cells, click the Paste Special button, or press CTRL+ALT+V.

    In the invoked Paste Special dialog box, select one of the following options.

    All - paste all cell content and formatting.

    Formulas - only paste formulas, as entered in the Formula Bar.

    Values - only paste cell values.

    Formats - only paste cell formatting.

    Comments - only paste the comments added to the cells.

    All except borders - paste cell content and formatting without cell borders.

    Column widths - paste the column widths of the copied cells to another range of columns.

    Formulas and number formats - only paste formulas and number formatting options from the copied cells.

    Values and number formats - only paste values and number formatting options from the copied cells.

    Skip blanks - avoid replacing values in the paste area when the copy area includes blank cells.

Right-click the cell in which you wish to paste the Clipboard content, and select the Paste item in the context menu.

Expanded End-User Restrictions

To prevent end-users from performing Clipboard operations, use the SpreadsheetControlOptions.Behavior property, which provides access to restriction settings. The table below lists possible restrictions you can set when an end-user works with the Clipboard in the SpreadsheetControl.

Restriction

Description

SpreadsheetBehaviorOptions.Cut Gets whether or not end-users are allowed to perform the Cut operation.
SpreadsheetBehaviorOptions.Copy Gets whether or not end-users are allowed to perform the Copy operation.
SpreadsheetBehaviorOptions.Paste Gets whether or not end-users are allowed to perform the Paste operation.

Set the required property to DocumentCapability.Disabled or DocumentCapability.Hidden to disable or hide the corresponding command in the Ribbon UI and the spreadsheet popup menu. To reinforce the protective effect, you can prevent the context menu from being displayed. For details, refer to the How to: Customize or Hide the Popup Menu example.

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