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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Catching the PasteCellText event.....

Thread ID:

Created:

Updated:

Platform:

Replies:

55353 Jan 29,2007 12:06 PM UTC Jan 29,2007 01:32 PM UTC WinForms 2
loading
Tags: GridControl
Colin
Asked On January 29, 2007 12:06 PM UTC

I have a simple test program with one syncfusion grid. I am trying to catch when the user has pasted some text into the grid by registering a PasteCellText function like so:

public Form1()
{
InitializeComponent();
gridControl1.PasteCellText += this.onPaste;
}

the function onPaste looks like

private void onPaste(object sender, GridPasteCellTextEventArgs e) {
Debug.Write("Paste");
}

but this is not called when I paste text into any cells!

The full solution is attached but contains nothing more than these lines.

Am I missing something here??

Any help appreciated!

Regards

Colin



WindowsApplication172.zip

Colin
Replied On January 29, 2007 01:22 PM UTC

It seems that pasting text from the table to itself does not fire the event but copynig and pasting text from another source (such as Notepad) does fire the event correctly.

Is this a known issue?

Administrator [Syncfusion]
Replied On January 29, 2007 01:32 PM UTC

If you are copy from a GridControl and paste in a GridControl, then by default style objects are copied and pasted, and PasteCellText is not raised. To see the PasteCellText event raised, you can turn off support for copying styles (allowing only text to be pasted and PasteCellText to be hit). To turn off style copy/paste support in a gridcontrol, turn off this flag.

this.gridControl1.Model.CutPaste.ClipboardFlags &= ~GridDragDropFlags.Styles;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;