Hello All,
I had some difficulties loading data into TStringGrid and found this example by the forum user Handoko very helpful.
https://forum.lazarus.freepascal.org/index.php/topic,37181.msg249361.html#msg249361The example prog is extended to Load and Save via a TMemoryStream object and to observe StringGrid behavior under various conditions.
The biggest takeaway for me was that TStream descendants need their internal pointer reset to 0 before reading them with LoadFromStream methods (I'd assumed this was done automatically, but then why would it be?), otherwise a Document Root isn't found by the xmlparser when the Stream is read.
Hope someone finds this useful!
Dennis Reichel aka Msocorcim