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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Best way to delete a row from a Grid (Unbound)

Thread ID:





25154 Feb 20,2005 04:26 AM UTC Feb 20,2005 12:15 PM UTC WinForms 1
Tags: GridControl
Nick Zdunic
Asked On February 20, 2005 04:26 AM UTC

I want to be able to remove a row from the grid by selecting it and pressing the delete the key. Currently the behaviour is to make the cells in the row blank. What is the best way to do this? Should I capture the Delete KeyPress?

Administrator [Syncfusion]
Replied On February 20, 2005 12:15 PM UTC

One way you can do this is to handle the ClearingCells event and remove the row there.
private void gridControl1_ClearingCells(object sender, GridClearingCellsEventArgs e)
	GridRangeInfo range = e.RangeList.ActiveRange;
		this.gridControl1.Rows.RemoveRange(range.Top, range.Bottom);
		e.Handled = true;
		e.Result = true;


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

Live Chat Icon For mobile
Live Chat Icon