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

how to Stop/Cancel Paste operation

Thread ID:





97002 Oct 20,2010 02:05 AM UTC Nov 2,2010 01:42 PM UTC WinForms 1
Tags: GridControl
nazmi anuar
Asked On October 20, 2010 02:05 AM UTC

Hi there,

im using Grid Data Bound Grid and explicitly call the grid.Model.CutPaste.Paste()
and then im doing the validation of value pasted in the
Model.DataProviderSaveCellInfo event..

how do i stop the paste operation from the DataProviderSaveCellInfo whenever my custom validation is failing..


Yuvaraja V [Syncfusion]
Replied On November 2, 2010 01:42 PM UTC


Thank you for your interest in Syncfusion products.

In DataBoundDataGrid, We Can Cancel the paste option by using Result property with the following code,

void Model_ClipboardCanPaste(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
GridCurrentCell cc1 = this.gridDataBoundGrid1.CurrentCell;

if (cc1.Renderer.ControlText.Length>4)

e.Handled = true;
e.Result = true;

//Set Result Property to False to disable the process.

else if (cc1.Renderer.ControlText.Length>=3)
e.Handled = true;
e.Result = false;

private void Paste_Click(object sender, EventArgs e)

here is the link for the sample



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