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,
It is possible to have such behaviour. I've attached a sample that demonstrates that.
I hope that this will help you.
Hello Nikolay,
Ok now I understand :
To be able to copy selected rows and selected cells, you have to register to this two events : SelectedCellsCollectionChanged and SelectedRowsCollectionChanged.
Then you call a method from this event to set
xamGrid.ClipboardSettings.CopyType = GridClipboardCopyType.SelectedCells; (or GridClipboardCopyType.SelectedRows )
depending on what user just selected.
I don't really understand why this is involved like this, but at leat this way it should work.
Thanks,
Julien Benoit