Articles in this section

How to disable clipboard cut, copy, paste in a grid of WinForms GridControl?

Disable cut, copy, and paste operations

The copy, cut, and paste operations are handled by using the ClipboardCanCutClipboardCanCopy, and ClipboardCanPaste events and you can cancel the events by setting e. Handled to True and e.Result to False.

 

In this example, the ClipboardCanPaste event alone is explained.

void gridControl1_ClipboardCanPaste(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
{
  //disables the paste to the clipboard
  e.Handled = true;
  e.Result = false;
}
Private Sub gridControl1_ClipboardCanPaste(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs)
'disables the paste to the clipboard
e.Handled = True
e.Result = False
End Sub 

Note:

The events do not work in the Edit mode.

 

Samples:

C#: Disable Clipboard Options

VB: Disable Clipboard Options

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied