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.

how to Stop/Cancel Paste operation

Thread ID:





97001 Oct 19,2010 10:05 PM Oct 26,2010 08:56 AM Windows Forms 1
Tags: GridControl
nazmi anuar
Asked On October 19, 2010 10:05 PM

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..


Nirmal Raja [Syncfusion]
Replied On October 26, 2010 08:56 AM

Hi Nazmi,

Thank you for your interest in Syncfusion products.

You can make use of the ClipboardPaste event in which the condition can be checked and can block the paste operation by enabling the Handled property.

Please refer the code below:
void Model_ClipboardPaste(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
if (gridDataBoundGrid1.Model[gridDataBoundGrid1.CurrentCell.RowIndex, gridDataBoundGrid1.CurrentCell.ColIndex].Text.StartsWith("Name"))
e.Handled = true;

Also refer the sample attached in the below location:

Let me know if you have any concern.



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.