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.
Unfortunately, activation email could not send to your email. Please try again.

Paste Event in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

58995 Apr 3,2007 02:53 AM Apr 3,2007 11:32 AM Windows Forms 1
loading
Tags: GridControl
Uli Jung
Asked On April 3, 2007 02:53 AM

Hi,

I'm looking for a way to get informed when one or several rows are pasted into a GridGroupingControl. I can't find an event that is fired during or after the paste operation.

Any suggestions?

Thanks in advance.
Uli

haneefm [Syncfusion]
Replied On April 3, 2007 11:32 AM

Hi Uli,

You can try using the PasteCelltext event. The PasteCelltext event is raised cell by cell as the text is being pasted. You can validate the text before grid tries to do the past on that cell. You have the option of canceling the single cell paste or cancelly the rest of the paste as well.

If you want to see the PasteCellText event raised then turn off the support for copying styles (allowing only text to be pasted and PasteCellText to be hit). To turn off style copy/paste support in a grid, turn off this flag.

this.grid.TableModel.CutPaste.ClipboardFlags &= ~GridDragDropFlags.Styles;
this.gridGroupingControl1.TableModel.PasteCellText += new GridPasteCellTextEventHandler(TableModel_PasteCellText);

void TableModel_PasteCellText(object sender, GridPasteCellTextEventArgs e)
{
//try setting e.Cancel to TRUE for the invalid entries
}

Ans also you can handle the ClipboardPaste event of the grid to customize your pasting. Please refer the following forum thread for implementation.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=10877

Best regards,
Haneef

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.

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.

;