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.
Unfortunately, activation email could not send to your email. Please try again.

Deleting the contents of a cell in databoundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

8031 Oct 17,2003 03:56 AM Oct 17,2003 04:26 AM Windows Forms 1
loading
Tags: GridControl
Dave Hermans
Asked On October 17, 2003 03:56 AM

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 04:26 AM

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);
}    

CONFIRMATION

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.

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.

;