<ig:XamGrid x:Name="xamGrid" … > <ig:XamGrid.ClipboardSettings> <ig:ClipboardSettings AllowCopy="True" CopyOptions="IncludeHeaders"/> </ig:XamGrid.ClipboardSettings> </ig:XamGrid>
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.
When the copy operation is enabled, you can configure whether or not to include the xamGrid columns header text corresponding to the selected cells in the copied data.
The ClipboardSettings object’s CopyOptions property can have one of the following values of the GridClipboardCopyOptions enumeration:
IncludeHeaders - This is the default value of the CopyOptions property.
If the xamGrid Column object’s HeaderText property is presented, its value will be included in the copied data. If this property is missing – the Column’s object Key property value will be included. * ExcludeHeaders - The copy operation will not include corresponding columns header text of the selected cells.
The following code shows how this property can be set in XAML file or in the code-behind.
In XAML:
<ig:XamGrid x:Name="xamGrid" … > <ig:XamGrid.ClipboardSettings> <ig:ClipboardSettings AllowCopy="True" CopyOptions="IncludeHeaders"/> </ig:XamGrid.ClipboardSettings> </ig:XamGrid>
In Visual Basic:
Imports Infragistics.Controls.Grids xamGrid.ClipboardSettings.AllowCopy = True xamGrid.ClipboardSettings.CopyOptions = GridClipboardCopyOptions.IncludeHeaders
In C#:
using Infragistics.Controls.Grids; xamGrid.ClipboardSettings.AllowCopy = true; xamGrid.ClipboardSettings.CopyOptions = GridClipboardCopyOptions.IncludeHeaders;