Aquí tienes otra forma de hacerlo:
Código Delphi
[-]
var
i: integer;
begin
with TStringList.Create do
try
for i:= 0 to StringGrid1.RowCount - 1 do
Add(StringGrid1.Rows[i].CommaText);
SaveToFile('d:\1.txt');
finally
Free;
end;
end;
var
i: integer;
begin
with TStringList.Create do
try
LoadFromFile('d:\1.txt');
StringGrid1.RowCount:= Count;
for i:= 0 to Count - 1 do
StringGrid1.Rows[i].CommaText:= Strings[i];
finally
Free;
end;
end;