Vous êtes sur la page 1sur 1

procedure Tfrmunidades.

DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TSh


iftState);
begin
//Usando a tecla INSERT para adicionar
if (key = VK_INSERT) then
SeuDataSet.Append;
//Usando a tecla DELETE para excluir
if (key = VK_DELETE) then
SeuDataSet.Delete;
//Usando a tecla F2 para editar
if (key = VK_F2) then
SeuDataSet.Edit;
//Usando a tecla F5 para Gravar
if (key = VK_F5) then
SeuDataSet.Post;
...
end;

Vous aimerez peut-être aussi