I tried to use the EditControl in my project but during the test of the interface when I pressed CTRL + C an interop exception was thrown saying "The requested clipboard operation failed" or something like that. And the CopyWithoutSelection property is set to ''false''.
ADAdministrator Syncfusion Team April 6, 2004 11:14 AM
We were unable to reproduce the problem you describe above.
Can you post information on the Operating System and VS.NET version. Did you try setting the CopyWithoutSelection property to true and see if it makes a difference?
Can you post steps to reproduce this consistently in say one of the Essential Edit samples so that we can take a look?
MLMarc LeblancApril 6, 2004 09:27 PM
I had similar problems many times. My app was running on Windows 2000, .Net 1.1 and use Syncfusion Essential Suite (Edit, Docking Manager, XPMenus and Grid) (version 1.5 to 188.8.131.52).
In my case, the CopyWithoutSelection property is set to true.
At first I think that the problem was du to the english version of Win2K. (My application is build on a french version of Win2K with Visual Studio 2003 English). But the installation of french language pack didn''t solve the problem.
To temporary solve the problem I had to modify Essential Edit by enclosing calls to Clipboard with try/catch block. This workaround work as the Clipboard interop exception occurs after the copy take place. So just catching the exception is enough to make to CTRL-C work (at least for my app).
Actually there''s two place where exception occurs:
1) In the Copy method, thrown by the Clipboard.SetDataObject(SelectedText, true) call;
2) In the CanPaste property, thrown by the Clipboard.GetDataObject() call.
I hope this info can help.
ADAdministrator Syncfusion Team April 7, 2004 12:30 PM
Thanks for the update. We will try to reproduce this problem and take a look at your suggestion.
ZTZubin TikuDecember 10, 2004 12:01 PM
I am currently developing a product using the EssentialGrid and am also experiencing an error regarding the clipboard, however it only seems to occur on certain machines and only when I try to copy large quantities of information (3000 rows by 13 columns) from the Grid into the clipboard.
The affected machines are using EssentialGrid 184.108.40.206, and Windows 2000 5.0.2195 Service Pack 4, and .NET 1.1.4322.
P.S. I am also using the Grid in Virtual Mode.
The stack trace is as follows:
System.Runtime.InteropServices.ExternalException: The requested clipboard operation failed.
at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy)
at System.Windows.Forms.Clipboard.SetDataObject(Object data)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.CopyCellsToClipboard(GridRangeInfoList rangeList, Boolean bLoadBaseStyles)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.CopyRange(GridRangeInfoList rangeList)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ADAdministrator Syncfusion Team December 13, 2004 02:34 PM
It looks like you also sent an email to our Support team with reference to this problem. Kindly refer to support incident 15352 where the Grid Technical support team will interact with you on this issue.
ADAdministrator Syncfusion Team May 26, 2005 09:10 AM
So has this problem been fixed?
Or if not what is the exact workaround to cathing the xceptions?
ADAdministrator Syncfusion Team May 26, 2005 06:44 PM
The v3.2 Edit does not have any such issues. All the clipboard operations work fine in this. Please let me know if you need any other information.
ADAdministrator Syncfusion Team June 9, 2005 02:12 PM
we are not in a position to be able to make that upgrade
it seemed like there was a workaround from the previous mails, just wondered what it was
and how to do it...
ADAdministrator Syncfusion Team June 10, 2005 11:18 AM
so i''ve managed to replace the menu item with my own version
but still gets Ctrl.Insert calling into the broken syncfusion version
How is ctrl.insert hooked into the menu, the accelerator on the orig menu is Ctrl.C
and there doesn''t seem to be any key capture...
So near and yet so many crashes....
ADAdministrator Syncfusion Team June 14, 2005 08:10 AM
I''m able to reproduce the problem:
Start a RemoteDesktop session to a server/other XP client and start a an application that contains Essential Edit. At least the first time you''re copying something to the clipboard you''ll get an exception. Closing the RemoteDesktop session, the problem is away. Using the Clipboard.SetDataObject(data, false); does work all the time.
ADAdministrator Syncfusion Team June 14, 2005 12:10 PM
Hi Thomas and Peterainbow,
I have tested for this issue in our latest internal build and do not see any such problems even while using remote desktop. Please create a Direct-Trac incident in this regard and I will update you with the download instructions for our latest internal build. You could then test your application in it and see if you can recreate this issue. We appreciate your cooperation.
ADAdministrator Syncfusion Team June 14, 2005 12:55 PM
The following conditions:
- Windows XP SP2
- Start the Remote Desktop session first
- Start the application that contains the Edit control und hit a CTRL+C
It seams to be a problem of the .NET Framework when using the SetDataObject command.
ADAdministrator Syncfusion Team July 5, 2005 11:59 AM
I wish I had some more useful information for you. I have tested out your configuration with the new edit control and the legacy edit control, both worked fine for the Ctrl-C.
However, I have in fact seen the issue that you are referring to previously, and in fact it would happen on any call to set the clipboard data on that particular machine (e.g. not related to Essential Edit - the call could be in any project).
I do not know if you have the source code, but if you do, have you tried Marc''s workaround (mentioned above):
"To temporary solve the problem I had to modify Essential Edit by enclosing calls to Clipboard with try/catch block. This workaround work as the Clipboard interop exception occurs after the copy take place. So just catching the exception is enough to make to CTRL-C work (at least for my app)."