The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have a GDBG in which I am handling the Model.ClipboardPaste event. I used an example that was posted on these forums.
My problem is that regardless of where I copy or cut the data from, the clipboard "DataObject" field in the GridCutPasteEventArgs is always null.
I tried copying/cutting from within another GDBG and also from Excel.
Note that I am handling the ClipboardPaste event in order to ensure that there are enough rows available to hold all the rows being pasted. The result of the paste operation in the grid itself is that only the top row of whatever I have cut or copied is pasted.
Any ideas?
Thanks,
Andy
ADAdministrator Syncfusion Team January 12, 2005 04:13 PM UTC
You get the data directly from the Clipboard.
IDataObject iData = Clipboard.GetDataObject();
string psz = iData.GetData(DataFormats.Text) as string;
ADAdministrator Syncfusion Team January 12, 2005 06:14 PM UTC
Clay,
That works. It begs the question, however, of why there''s a DataObject in the parameters to the handler? Is that data object ever populated?
Andy
>You get the data directly from the Clipboard.
>
>IDataObject iData = Clipboard.GetDataObject();
>string psz = iData.GetData(DataFormats.Text) as string;
>
ADAdministrator Syncfusion Team January 12, 2005 10:08 PM UTC
You need to use the clipboard as that is where other programs will expect to find the information and to put this information.
Here is the help on that object. It is there so it can eventually be used for direct copy/paste within the same grid but that feature has not been implemented yet.
///
/// The DataObject to be used for further clipboard operations. This property will only be checked by the calling
/// method if you do not set to true. Can be NULL.
///
ADAdministrator Syncfusion Team January 13, 2005 08:57 AM UTC