Solved

Saving & Loading a TStringGrid

Posted on 1997-11-25
1
224 Views
Last Modified: 2010-04-04
How do I do a "SaveToFile" and "LoadFromFile" (or equivalent) of a TStringGrid??
I am using D1.
0
Comment
Question by:jdthedj
1 Comment
 
LVL 2

Accepted Solution

by:
Waldek earned 50 total points
ID: 1351910
You must create a descendant of TSringGrid with two additional method SaveToFile and LoadFromFIle. To create Savetofile you must save to textfile fist RowCount and colCount. After this You must save all cells with for i:=0 to col-1
                     for j:=0 to rows-1
                      writeln(f,cells[j,i]);
To load from file You must load first a cols and rows , then You must load data to every cell

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question