Hi Andy,
Thanks for your interest in Syncfusion Products.
In GridControl under cell edit mode, the default behavior of Delete key is, removing 1 character to the right of the caret position in cell on each key press which is the desired behavior for any editable controls. If the ActivateCurrentCellBehavior property is set to SelectAll, the cell selects entire contents on activation. With this, on pressing Delete key will delete the entire cell contents.
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;
If you would like to handle this behavior and set the default with the SelectAll property, the following code can be handled in CurrentCellKeyDown event.
this.gridControl1.CurrentCellKeyDown += new KeyEventHandler(gridControl1_CurrentCellKeyDown);
void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
TextBox tb = cc.Renderer.Control as TextBox;
tb.Select(0,0);
}
}
Here is a sample for your reference.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GC_DeleteKey2004313115.zipIf you want any other behavior to implement with certain keys, respective code can be handled in this event accordingly.
Regards,
Arulraj.A