Hello,
With the copy feature in XamGrid, I'm not able to copy the selection if I select the cells via the row selector: if I hit Ctrl-C, nothing is copied to clipboard.
Here is my xaml:
<ig:XamGrid Loaded="XamGrid_Loaded" Name="grid"> <ig:XamGrid.ClipboardSettings> <ig:ClipboardSettings AllowCopy="True" CopyOptions="ExcludeHeaders" CopyType="Default" /> </ig:XamGrid.ClipboardSettings> <ig:XamGrid.SelectionSettings> <ig:SelectionSettings CellSelection="Multiple" RowSelection="Multiple" /> </ig:XamGrid.SelectionSettings> <ig:XamGrid.RowSelectorSettings> <ig:RowSelectorSettings EnableRowNumbering="False" Visibility="Visible" /> </ig:XamGrid.RowSelectorSettings> </ig:XamGrid>
Am I missing something?
I'm attaching a zip file with a sample project and a screenshot.
Regards,
Hi,
When the CopyType is Default, the value of the SelectionSettings object’s CellClickAction property specifies whether a cell or row collection will be copied.
Based on the xaml in your post - The SelectionSettings.CellClickAction is CellSelectionAction.SelectCell (the default value) and only the cells from the SelectionSetting.SelectedCells collection will be copyied.
You can read more about copy and paste in this article:http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=SL_xamGrid_Specify_the_Content_to_Be_Copied.html
Hello Nikolay,
If I understand correctly, I can either:
but I can't have both behaviors?
Copying works only with the selected cells (the SelectionSetting.SelectedCells collection) or only with the selected rows (the SelectionSettings.SelectedRows collection).
The selected rows are copied if:ClipboardSettings.CopyType = SelectedRows or ClipboardSettings.CopyType = Default and SelectionSettings.CellClickAction = SelectRow.The selected cells are copied if:ClipboardSettings.CopyType = SelectedCells orClipboardSettings.CopyType = Default and SelectionSettings.CellClickAction = SelectCell.HTH
If I understand correctly the behavior I want is not possible by design.
I can't have SelectionSettings.CellClickAction = SelectCell to allow my user to select some cells, and a row selector to allow them to select some lines, and copy them to clipboard.
So I can't have an excel like behavior for selection and have copy working at the the same time.