procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char); begin
if Key = #13 then
with StringGrid1 do
if Col then {next column} Col := Col + 1 else if Row then
begin {next Row} Row := Row + 1;
Col := 1; end
else
begin {End of Grid- Go to Top again} Row := 1;
Col := 1; end; end;