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

Ctrl-Del key combination on grid

what does the Ctrl-Del key combination actually do on the current cell on a grid control? my grid is all working fine until user presses Ctrl-Del, the contents in the current cell get deleted, that's fine but the cell type also changes to Static, which stops user from further editing the cell thanks in advance!

4 Replies

AD Administrator Syncfusion Team September 5, 2003 02:42 AM

I don't see this behavior in version 1.6.x.x when I just drop a GridControl on a Form. The sample I used is attached. Pressing ctl+del does delete the content of the cell, but I can continue typing and editing the cell. What is different about what you are doing?


JC jacky chen September 7, 2003 01:56 PM

mine is version 1.5.2.0 and the CellSettings for the grid control is set to be Static on CellType then i changed the CellType for some of the cells into TextBox in my code and then when i do Ctrl-Del, the Cell seams to become Static again any idea what's going on? thanks!


AD Administrator Syncfusion Team September 7, 2003 03:56 PM

The cell style is probably being cleared. You can avoid this by handling ClearingCells.
private void gridControl1_ClearingCells(object sender, GridClearingCellsEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.RangeInfo == e.RangeList.ActiveRange && 
		this.gridControl1[cc.RowIndex, cc.ColIndex].CellType == "TextBox")
	{
		e.Handled = true;
	}
}


JC jacky chen September 7, 2003 06:50 PM

alright, that works, thanks!

Loader.
Live Chat Icon For mobile
Up arrow icon