Prevent CTRL+DELETE in DBGrid
If you need to disable keyboard delete operation inside a DBGrid you’ll need to disable the CTRL+DELETE key press.
1 2 3 4 5 |
procedure Form1.DBGrid1KeyDown (Sender: TObject; var Key: Word; Shift:TShiftState) ; begin if (Shift = [ssCtrl]) and (Key = VK_DELETE) then Key := 0; {ignore} end; |