Skip to main content Skip to footer

How to Enable Copy and Paste Operations in FlexGrid

Even when editing is enabled on a FlexGrid (AllowEditing = true), users may find that pressing standard keyboard shortcuts like Ctrl+C, Ctrl+X, or Ctrl+V does not copy, cut, or paste cell values as expected.

Solution
By default, the AutoClipboard property on the FlexGrid is set to false. When disabled, the grid restricts automatic clipboard operations to prevent accidental data modification or overwrites.

To enable standard copy, cut, and paste functionality for selected cells, set the AutoClipboard property to true. You can configure this setting either in the Visual Studio designer via the Properties window or programmatically in code during initialization.

// Enable automatic copy, cut, and paste keyboard shortcuts (Ctrl+C, Ctrl+X, Ctrl+V)
flexGrid.AutoClipboard = true;
<!-- Alternatively, configure directly in XAML or designer settings -->
<c1:FlexGrid x:Name="flexGrid" AutoClipboard="True" AllowEditing="True" />