Regrading disable the COPY/Cut /Paste Exception

Hi


Can you tell how can i disable the CUT/Copy/paste exception in GRid control?


I shall be thankful for you.


Regards
Vicky


1 Reply

JJ Jisha Joy Syncfusion Team May 23, 2008 08:22 AM UTC

Hi Vicky,

If your intension is to prevent Clipboard Copy/Paste/Cut, this can be achieved by hadling the events ClipboardCanCopy, ClipboardCanCut, ClipboardCanPaste.

Please refer the code:


this.gridControl1.Model.ClipboardCanCopy += new GridCutPasteEventHandler(Model_ClipboardCanCopy);
this.gridControl1.Model.ClipboardCanCut += new GridCutPasteEventHandler(Model_ClipboardCanCut);
this.gridControl1.Model.ClipboardCanPaste += new GridCutPasteEventHandler(Model_ClipboardCanPaste);

void Model_ClipboardCanPaste(object sender, GridCutPasteEventArgs e)
{
e.Handled = true;
e.Result = false;
}

void Model_ClipboardCanCut(object sender, GridCutPasteEventArgs e)
{
e.Handled = true;
e.Result = false;
}

void Model_ClipboardCanCopy(object sender, GridCutPasteEventArgs e)
{
e.Handled = true;
e.Result = false;
}



Please let me know if this helps.

Regards,
Jisha



Loader.
Up arrow icon