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

GridControl + Event ClipboardCanPaste Not Getting Fired

Hi all

I am facing a strange issue. I picked up a piece of WinForms code but there is a strange issue. I have wired an event on ClipboardCanPaste but it is not being called when pasting in the GridControl. I tried putting a new Grid on the same form and that works just fine. ClipboardPaste is not working either. I can catch other non-Clipboard events. Please help. Thanks.

Nabeel

2 Replies

AS Athiram S Syncfusion Team March 13, 2013 05:15 PM UTC

Hi Nabeel,

Thanks for your interest in Syncusion Products.

We are able to reproduce the issue at our end. we will analyse this issue and will report you as soon as possible.

Regards,
Athiram S


AS Athiram S Syncfusion Team April 22, 2013 12:10 PM UTC

Hi Neebal,

I deeply regret for the delay caused in posting the response.

The “ClipboardPaste” event is not triggered whenever the cell enters into Edit mode. This is because when the cell enters the Edit mode, then the renderer of the cell is taken into consideration, preventing the firing of “ClipboardPaste” event. If we want to access “ClipboardPaste” event, you can make use of the  ActivateCurrentCellBehavior” property and achieve the firing of event.

Code:

this.gridControl1.ActivateCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridCellActivateAction.DblClickOnCell;

Kindly, refer to the attached sample for details.

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/106300/ClipBoard_paste-1025567605.zip

In the sample, you can make the pasting of contents in the cell with the firing of the “ClipboardPaste” event. If you find any problem with this workaround, you can continue using the workaround mentioned by you in previous update.

Please let me know if you have any concerns.

Regards,
Athiram S


Loader.
Live Chat Icon For mobile
Up arrow icon