Articles in this section
Category / Section

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

1 min read

Disable cut, copy and paste operation

The copy, cut, paste operations are handled by using the ClipboardCanCut, ClipboardCanCopy, 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.

C#

void gridControl1_ClipboardCanPaste(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
{
//disables the paste to the clipboard
e.Handled = true;
e.Result = false;
}

 

VB

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)
Please sign in to leave a comment
Access denied
Access denied