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

Events and pasting into multiple cells

Thread ID:





57389 Mar 2,2007 04:49 PM UTC Mar 2,2007 05:49 PM UTC WinForms 1
Tags: GridControl
Asked On March 2, 2007 04:49 PM UTC

Is there documentation somewhere that will walk me through what happens when someone pastes values into multiple cells at once?

If someone pastes into multiple cells at once I want to be able to validate each of the individual cell values, and then once all of the pasted cells are validated I want to refresh the grid data from the database. I've got this working now with single cell pasting, but I'm not sure what events I should be following for pasting into multiple cells.



Administrator [Syncfusion]
Replied On March 2, 2007 05:49 PM UTC

Hi Chris,

One way to handle this is in your PasteCellText event handler, you can check if the cell being past in is one you want to paste or not. If not, return e.Cancel = True. You could do this by checking the row & col, or by checking a e.Style property like e.Style.ReadOnly for example.

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

this.gridControl1.Model.PasteCellText += new GridPasteCellTextEventHandler(Model_PasteCellText);
void Model_PasteCellText(object sender, GridPasteCellTextEventArgs e)
if( e.Text != "SomeValue")
Console.WriteLine(e.RowIndex + ":::" + e.ColIndex);
e.Cancel = true;

Best regards,


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

This page will automatically be redirected to the 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