...
A workaround would be to create another instance of TSringGrid and copy only filled columns to that one. Then let the newly created grid do the SaveToCSVFile.
I got the same suggestion from a programmer friend who uses C++ builder a lot, so he knew what I was talking about when I said "TStringGrid". I'll keep that in my bag of tricks...
You could also post a feature request in the bugtracker for an extra optional parameter (e.g. SkipEmptyRows).
I think that's a pretty good idea. I'll do it.
Or you could itterate over the grid and put all the filled lines on top, then afterwards set the rowcount property to the number of filled lines...
All lines will be filled from the top row to the last row used, there won't be any intermediate blanks, so it will be just as effective to simply do a loop that detects filled rows, and set .RowCount to the index of the last filled row detected. Very simple and direct, I like it!
I think this procedure does what you are after:
...
Ahh... example code; a thousand thank you's, Howard!
I'll be trying all of these out tonight, thank you everyone!
For now, I just have the TStringGrid start out with 1 row and create new rows as I need them. Having the blank space below the grids doesn't look as bad as I thought it would, but I'll ask my potential users what they'd prefer.
Thanks so much everybody!