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

Paste Event in GridGroupingControl

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

1 Reply

HA haneefm Syncfusion Team April 3, 2007 03:32 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon