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

Deleting the contents of a cell in databoundgrid

Thread ID:





8031 Oct 17,2003 07:56 AM UTC Oct 17,2003 08:26 AM UTC WinForms 1
Tags: GridControl
Dave Hermans
Asked On October 17, 2003 07:56 AM UTC

Hi, 'im using a databoudn grid, when i press the delete i want the contents of the currently selected cell to be cleared. Until now it deleted the entire row. I solved that by canceling the rowsdeleting event, but now i want the selected cell to be cleared. I tried using the currentcell and setting its value to an empty string, this worked, but when i do it on the last row real roow (not the empty one added) then it creates another empty line. Any ideas? Kind regards Dave

Administrator [Syncfusion]
Replied On October 17, 2003 08:26 AM UTC

Try ClearCells instead.
private void gridDataBoundGrid1_RowsDeleting(object sender, GridRowRangeEventArgs e)
	e.Cancel = true;
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	this.gridDataBoundGrid1.Model.ClearCells(cc.RangeInfo, false);


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