¿Pero dónde tecleas?, ese código funcionará si estás tecleando en el propio dbgrid.
Cámbialo al form, por ejemplo:
Código Delphi
[-]procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin
if (ActiveControl=dbgrid1) then if key in ['A'..'Z','a'..'z'] then
tabla1.locate('nombre', key, [locaseinsensitive,lopartialkey]);
end;