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).
Close Icon
Unfortunately, activation email could not send to your email. Please try again.
Close Icon
close icon
Vote for your favorite ebook
Succinctly Readers Awards 2020
Syncfusion Feedback

delete row by key on a grid

Thread ID:





51775 Nov 14,2006 08:10 AM UTC Jan 12,2009 06:15 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On November 14, 2006 08:10 AM UTC

Hi there,

I have a grid on a form very simple, and by selecting a row and pressing the delete key the row get's deleted.

I didnt do anything to get this behaviour !!!
How can i disable the delete of a row by pressing the delete key, or if that isn't possible disable all keys on the grid ?


Administrator [Syncfusion]
Replied On November 14, 2006 09:22 AM UTC

Hi OL,

Issue 1: For GridControl DeleteKey.

To disable the DeleteKeyBehavior in a grid, you can handle the CurrentCellKeyDown and set the e.Handled to TRUE. Here is a code snippet

private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
if( e.KeyCode == Keys.Delete )
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
if(!cc.IsEditing )
e.Handled = true;

Issue 2: DataBound DeleteKey

Try setting the EnableRemove property of the grid to FALSE. Below is a code snippet.

this.grid.EnableRemove = false.

Best Regards,

Omry Levy
Replied On November 14, 2006 04:43 PM UTC

Thanks worked like a charm.

Could you consider adding the following:

1) a delete permission on the grid as a whole

2) keyboard disable on the grid as a whole

Jisha Joy [Syncfusion]
Replied On January 12, 2009 06:15 AM UTC

Hi Julie,

Please use the following link for the forum thread that dicusses the same issue.




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