We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Copy Custom data in grid

Hi,

I've got a grid where I need to be able to copy some custom data from one cell to another. I have a cell with a button edit in it, from which I can invoke a custom property editor for an object that has multiple properties on it. The cell represents a single instance of this object, and the text in the cell is just a description of the object. So, in the copy part, I would like to put a struct on the clipboard, and in the paste, if the destination cell is the same type as the source cell, read the properties in the struct off the clipboard and apply them to the instance in the destination cell, otherwise just do the default copy/paste behavior.

There is a ClipboardCopy event, which seems like the place to start, but what should I do with this event? Is there a sample that I should be looking at.

Thanks,

Aaron

1 Reply

LS Lingaraj S Syncfusion Team June 25, 2009 06:15 PM UTC

Hi Aaron,

Thank you for your interest Syncfusion product.

The ClipboardCanCopy and ClipboardCanPaste events were fired, when the copy and paste operation has been performed in GridControl. If you want to customize this operation, then please try using ClipboardCanCopy and ClipboardCanPaste events in GridControl to achieve this behavior.

Please refer the sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/GridCopy.zip

This sample demonstrates overriding the style in copy paste operation.

Please let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon