Hello,
Thanks for the new copy/paste in grid!
I would like to add a context menu to my grid with an option to copy selected cells to clipboard. How do I programmatically copy the selected cells in Infragistics grid to the clipboard?
What method should I call?
Regards,
Currently the easiest way to accomplish this is to create a class that inherits from the XamGrid. Then, create copy and paste methods which in turn call base.CopyToClipboard() and base.PasteFromClipboard(). You would then use the custom grid in your project and call the new methods from the click event of the ContextMenuItem. I've attached a small sample that demonstrates this approach though I use a button rather than a context menu to call the copy operation.
The reason this is needed is that the methods are marked as protected rather than being marked as public. We'll be exposing these methods publicly in the future.
Hello Jason,
Thanks! I was not sure this was a recommended way to do this.
Julien Benoit