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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ShortCut Key

Thread ID:





48817 Sep 5,2006 06:24 AM UTC Sep 5,2006 09:41 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On September 5, 2006 06:24 AM UTC


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


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

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon