# Clipboard

## Content

FlexGrid supports standard clipboard operations through the AutoClipboard property. When AutoClipboard is set to `true`, users can copy, paste, and cut cell values by using standard keyboard shortcuts. The PreventCut property controls whether the grid processes cut operations. PreventCut applies only when AutoClipboard is enabled.

***

## Clipboard Behavior

| Configuration | Behavior |
| ------------- | -------- |
| AutoClipboard = `false` | FlexGrid ignores clipboard keyboard shortcuts. PreventCut has no effect. |
| AutoClipboard = `true`, PreventCut = `false` | FlexGrid performs the default cut operation. Selected values are copied to the clipboard, and editable cell values are cleared. Read-only cells are copied but remain unchanged. Rows are not deleted. |
| AutoClipboard = `true`, PreventCut = `true` | FlexGrid does not process cut shortcuts. Copy and paste behavior remains available, and applications can handle the shortcut through custom logic or a parent element. |

The default value of PreventCut is `false`.
![C1Web FlexGrid - Filtering the Country name in Filtering.](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/Filtering%20GIF-20261007.54e377.gif)

***

## Code Snippets

The following example enables clipboard support and suppresses the built-in cut operation.
**Controllers**
Add the following action method to configure the clipboard settings for the FlexGrid sample.

```auto
private static List<Sale> _clipboardSource = Sale.GetData(20).ToList();
public ActionResult Index()
{
    return View(_clipboardSource);
```

**[ASP.NET](http://asp.net/ "http://asp.net/") Core View**
Add the following configuration to enable clipboard operations and prevent cut behavior using the tag helper syntax.

```auto
@model IEnumerable<Sale>

<c1-flex-grid id="clipboardGrid"
              auto-generate-columns="false"
              auto-clipboard="true"
              prevent-cut="true">

    <c1-flex-grid-column binding="ID"
                         header="Id"
                         is-read-only="true">
    </c1-flex-grid-column>

    <c1-flex-grid-column binding="Country"
                         header="Country">
    </c1-flex-grid-column>

    <c1-flex-grid-column binding="Product"
                         header="Product">
    </c1-flex-grid-column>

    <c1-flex-grid-column binding="Amount"
                         header="Amount"
                         format="c2">
    </c1-flex-grid-column>

    <c1-flex-grid-column binding="Active"
                         header="Active">
    </c1-flex-grid-column>

    <c1-items-source source-collection="@Model"></c1-items-source>

</c1-flex-grid>
```