Hi Sim,
You can handle the RowsDeleting event of the grid and set e.Cancel to true, to avoid the default behavior of deleting rows when delete key is pressed.
If you have set the ListBoxSelection mode and want to delete the text alone when delete key is pressed, you can follow the code below.
private void gridDataBoundGrid1_RowsDeleting(object sender, GridRowRangeEventArgs e)
{
if(this.gridDataBoundGrid1.CurrentCell.IsEditing)
{
e.Cancel = true;
GridTextBoxControl tb = (GridTextBoxControl)this.gridDataBoundGrid1.CurrentCell.Renderer.Control;
if(tb.SelectionLength == 0)
tb.SelectionLength = 1;
tb.SelectedText = "";
}
}
Let me know if you have any other questions.
Regards,
Rajagopal