禁止在DBGrid中按delete删除记录

procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if (ssctrl in shift) and (key=vk_delete) then key:=0;
end;

原文地址:https://www.cnblogs.com/martian6125/p/9631585.html