Delphi Date 12/Sep/2004  
Well this is my first column ... and I'll launch it off with some links on Delphi

I'm running version 4 Professional Edition. Picked it up for £40.00 two years ago and its very good! But I discovered that you need to upgrade; there are bugs in it! Plus some components wont run unless you have the upgrade installed.

The DELPHI upgrade site link is [ HERE ] Install the patches IN ORDER! ie: Pack 2 first followed by Pack 3 etc ...

Written by : Terry  

 String Grids Date 12/Sep/2004  
Grids - there are a lot out there as I discovered.

Now what I wanted was cell merging and cell border colour control like in Excel.
That combination was not so easy to find!

The first Google result was a grid called TAdvStringGrid and whilst it does these things it ain't cheap! as there are add ons to buy
ie:-
The basic grid is called TAdvStringGrid you need TAdvSpreadGrid to get Spreadsheet capabilities on your grid. Then there is a Column editor called TAdvColumnGrid -
There is an advert on the bottom of the grid, removed when you buy a license. All these cost about $60:00 each! or you can buy them all in a TMS Pack price [ lots of other components ] for about $170.00. btw the SpreadGrid is Extra and not included!

The old versions can be found on TORRY'S WEB PAGE with no advertising inside the grid, they work OK! The SpreadSheet add on will install with the StringGrid. So you can try them out first. The NEW versions wont; you have to Buy the StringGrid before you can evaluate the SpreadSheet (con!)

The second search found something called - Professional Grid Its simplicity makes it worth buy a license. It does ALL I require! You can Import Excel Spreadsheets "Layouts" and Formula! you can even Save the Grid "Layout" to a file for re-loading. It has no add ons! it's a complete StringGrid and SpreadGrid. The Online help (on the Web Site) has Lots of examples and these show what can be done with it! It cost $130.00 with source and upgrade path or $87.00 for license only! ... It's worth every penny!
btw - The Evaluation version wont run outside Delphi IDE [ but its no biggy ]

The third search found this gem below! making a professional GRID This is a real pearl and takes you through the bits of making a Professional String Grid.
It's very good! check it out. The source on the articles is included on the last page!

Written by : Terry  

 Professional Grid Usage Date 12/Sep/2004  
"A How To" on Loading an Excel Spreadsheet into your grid. Saving the Grid and re-Loading the Grid Format.

First Drop a Grid on the Form and Three Buttons. I called the grid name "grid1" (for simplicity )

double click on button 1 [ Load the Excel file ] and put these lines.
Grid1.ImportFromExcelFile( 'BS.xls', 'sheet 1', True);
The file name I imported was called "BS.xls", I wanted "sheet 1" to be imported, and the "True" bit ensures that the Layout ie: borders Merged cells were kept. NOTE: Its does take time to Load - so be patient.

double click on button 2 [ Save the Layout Grid ] and put these lines.
Grid1.SaveToIniFile( 'bs1.ini' );
I called the saved file "bs1.ini"

double click on button 3 [ Load the Saved Layout file ] and put these lines.
Grid1.LoadFromIniFile( 'bs1.ini' );

again -- note: the saved file is called "bs1.ini"

// All the functions returns a Boolean True or False
// ImportFromExcelFile(const FileName: string; _
          const SheetNameOrIndex: Variant; _
          ImportCellBorders: Boolean = False): Boolean;
// SaveToIniFile(const FileName: string): Boolean;
// LoadFromIniFile(const FileName: string): Boolean;

There is an example of a progress BAR indicator on the web site: The Grid has two onProgress Events ... Import Shown below.

procedure TForm1.Grid1ImportProgress(Sender: TProfGrid; FinishedSteps,
TotalSteps: Integer; var Stop: Boolean);
begin
Gauge1.MaxValue := TotalSteps;
Gauge1.Progress := FinishedSteps;
end;


It Works well! - As I say the Import can take Time:

This Grid is so easy to use ... It's a Pleasure!

Written by : Terry