I'm having a problem with my code, ok I explain me more. I have the next visual design:
In my SaveDialog button I have the next code (added on the "Exportar" button):
procedure Button2Click(Sender:TObject);
var
i: integer;
strT: string;
slst:TStringList;
begin
slst:=TStringList.Create;TryWithDBGrid1.DataSource.DataSetDo
begin
First;while not Eofdo
begin
strT:='"'+Fields[0].AsString+'"';for i:=1 to FieldCount-1do
strT:= strT+',"'+Fields[i].AsString+'"';
slst.Add(strT);Next;
end;First;
end;ifSaveDialog1.Execute(0)then
slst.SaveToFile(SaveDialog1.filename);Finally
slst.Free;End;
end;
And its save me only the DBGrid, but I wanna save the full file, I mean, the Columns and content of the DBGrid and the operation result (on the bottom).
Can anybody explain me how to do it or what I'm doing wrong, please?
Question
tetsu-kun
Hey guys.
I'm having a problem with my code, ok I explain me more. I have the next visual design:
In my SaveDialog button I have the next code (added on the "Exportar" button):
And its save me only the DBGrid, but I wanna save the full file, I mean, the Columns and content of the DBGrid and the operation result (on the bottom).
Can anybody explain me how to do it or what I'm doing wrong, please?
Thanks.
Regards.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now