Version

Enable Copy and Paste Support

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.

Copy and paste support in the xamGrid control is not enabled by default.

You can enable this feature in the XAML file or in the code-behind. The ClipboardSettings object’s properties are used to configure this functionality.

In the xamGrid control, copy and paste operations are mapped to the standard keyboard shortcuts. The "CTRL + C" combination performs copy and "CTRL + V" performs paste.

To enable the copy operations you have to set the AllowCopy property to True. To enable the paste operation, set the AllowPaste property to True.

The user-initiated paste doesn’t involve any internal paste operations in the xamGrid control. The result of this operation is an event that is fired and you can further manipulate data stored in the event argument – ClipboardPastingEventArgs.

The following code demonstrates how to enable copy and paste operations in XAML and in the code-behind.

In XAML:

<ig:XamGrid x:Name="xamGrid" … >
    <ig:XamGrid.ClipboardSettings>
        <ig:ClipboardSettings AllowCopy="True" AllowPaste="True"/>
    </ig:XamGrid.ClipboardSettings>
</ig:XamGrid>

In Visual Basic:

xamGrid.ClipboardSettings.AllowCopy = True
xamGrid.ClipboardSettings.AllowPaste = True

In C#:

xamGrid.ClipboardSettings.AllowCopy = true;
xamGrid.ClipboardSettings.AllowPaste = true;