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:

Created:

Updated:

Platform:

Replies:

97001 Oct 20,2010 02:05 AM UTC Oct 26,2010 12:56 PM UTC WinForms 1
loading
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..

thanks


Nirmal Raja [Syncfusion]
Replied On October 26, 2010 12:56 PM UTC

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:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GDBGCopypaste-1759324832.zip

Let me know if you have any concern.

Regards,
Nirmal


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.

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

;