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.
Unfortunately, activation email could not send to your email. Please try again.

ShortCut Key

Thread ID:





48817 Sep 5,2006 02:24 AM Sep 5,2006 05:41 AM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On September 5, 2006 02:24 AM


How to disable the shortcut key(Ctrl + X and etc)
of the GDBG.


Administrator [Syncfusion]
Replied On September 5, 2006 05:41 AM

Hi Lim,

One way to do this is to derive the grid and override ProcessCmdKey. Here is a code snippet

public class MyDataControl : GridDataBoundGrid
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
if( ( keyData&Keys.Control )== Keys.Control || ( keyData&Keys.Shift )== Keys.Shift )
return true;
return base.ProcessCmdKey(ref msg, keyData);

If you do not want to derive the grid, then you can handle CurrentCellControlKeyMessage. Please find the code snippet below.

//form Load...
this.grid.CurrentCellControlKeyMessage +=new GridCurrentCellControlKeyMessageEventHandler(CurrentCellControlKeyMessage);

private void CurrentCellControlKeyMessage(object sender, GridCurrentCellControlKeyMessageEventArgs e)
if(( (Control.ModifierKeys & Keys.Shift) != 0 )|| ((Control.ModifierKeys & Keys.Control) != 0 ))
e.Handled = true;
e.Result = true;

Let me know if this helps.
Best Regards,


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.

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.