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 06:42 AM UTC

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 05:56 PM UTC

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 07:56 PM UTC

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 10:50 PM UTC

alright, that works, thanks!

Loader.
Up arrow icon