how to disable the ctrlV key

Hi Clay, Could you please help on that: In gdbg_CurrentCellStartEditing() event I set e.Cancel = true if grid has no rows. So I cannot type in the cell, but I can paste using ctrlV and then I get null object reference exception. So how to disable ctrlV? Thanks

1 Reply

AD Administrator Syncfusion Team September 22, 2004 07:14 PM UTC

You can prevent a paste by subscribing to the grid.Model.ClipboardCanPaste event and setting e.Handled = true and doing nothing in your handler.
private void Model_ClipboardCanPaste(object sender, GridCutPasteEventArgs e)
{
	e.Handled = true;
	e.Result = false;
}

Loader.
Up arrow icon