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

Delete of contents in a GridControl

Thread ID:





88839 Aug 13,2009 06:39 AM UTC Feb 28,2013 06:29 PM UTC ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Priya S
Asked On August 13, 2009 06:39 AM UTC


I'm using GridControl object to display some data in a form. But when a row or column header is selected and delete key is pressed, all the data in the selection gets removed. I tried to set some property values and override the keypress event for the current cell. But, I could not stop this from occuring.

Is there anyway i can block the delete operation?


Jisha Joy [Syncfusion]
Replied On August 18, 2009 10:27 AM UTC

Hi Priya,

The desired behavior can be achieved by handling the KeyDown event of GridControl. See the code:
void gridControl1_KeyDown(object sender, KeyEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (cc.ColIndex == 0 || cc.RowIndex == 0)// Checking for row/column header
if (e.KeyCode == Keys.Delete)
e.Handled = true;

Thank you for using Syncfusion products.


Priya S
Replied On August 18, 2009 02:12 PM UTC


Thanks a lot. That helped.

I was trying with the current cell key down event and tried to return if the key value was delete. But that never worked.

Thanks again.

Edward Reyes
Replied On February 28, 2013 06:29 PM UTC

We have AllowDelete set to false, AllowMultipleRecordDeletion set to false, AllowSelection set to False and with a LeftShift Key and a Delete Key pressed in combination, the Selected row is still being deleted.  How can all deletions be disabled?  Is this yet another Syncfusion bug that has to get fixed?


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