Lo más sencillo que se me ocurre es que utilices ta propiedad
TAG (por ejemplo) del botón para marcar la fila donde se encuentra. Una vez pulsado el botón puedes recuperar el valor de ea propiedad.
Código Delphi
[-]
...
btn := TButton.Create(Self);
btn.Caption:= 'Modificar';
btn.Width:= 87;
btn.Parent:= StringGrid1;
btn.BoundsRect:= StringGrid1.CellRect(6, contador);
btn.Tag := contador;
...
btnView := TButton.Create(Self);
btnView.Caption:= 'Formulario';
btnView.Width:= 87;
btnView.Parent:= StringGrid1;
btnView.BoundsRect:= StringGrid1.CellRect(7, contador);
btnView.Tag := contador;
En el OnClick puedes recuperar ese valor utilizando el Sender.
Código Delphi
[-]
...
if (Sender is TButton) then begin
fila := TButton(Sender).Tag;
end;
...