Ver Mensaje Individual
  #1  
Antiguo 30-07-2004
Avatar de pinoxito
pinoxito pinoxito is offline
Miembro
 
Registrado: sep 2003
Posts: 16
Reputación: 0
pinoxito Va por buen camino
Question Como inhabilitar Ctrl+Supr en Rejilla de datos

Como puedo inhabilitar que cuando se teclee Ctrl+Supr en una rejilla de datos no aparezca el mensaje "Delete record?" y que no pueda borrar nada??

He intentado capturar la tecla en el evento onKeyDown de la rejilla y darle un valor nulo, pero no hace nada.

procedure TAlbaranes.LineasKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ( ssCtrl in Shift ) and ( key = VK_DELETE) then // ctrl + Supr
begin
if ( Albaranes_DM.AlbaranL.FieldByName('ACTUALIZADO').ASString = 'S')
then key := 0;
end;
end;
Responder Con Cita