There's quite a bit of information out there on serialization. https://duckduckgo.c...+a+control+in+delphi
I don't know enough about Delphi specifically, but... the principles are pretty general.
If you have 2 objects there, I'd probably just create an:
Then fill it like:
object = obj1;
object = obj2;
Then serialize that. It's very simple and uncomplicated, but certainly doesn't allow for changing "file formats" later on. Something like "filename.<version>.<extension>" could help solve that problem easily though. Not the neatest solution, but workable and certainly a lot less work than creating a customized file format.
However, looking at your code, you've got an array in there, so it might be just as easy to create an XML file with something like this:
Or something like that. There are many ways, and that's just one very simple example. Not a very good one though... Just illustrating... The point is that you can create the entire grid in XML and pretty much do whatever you want. However, it is more complex than doing simple binary serialization. The good news is that there are lots of XML libraries to help out.
I like XML as it is very simple to use, and if designed right, is nicely compatible going forwards or backwards.