I am sure this must be obvious, but I couldn't manage to find out an easy way to implement undo/redo in a StringGrid using TStream, which I see in this forum as a convenient solution.
This is what I do:
var
Copia: TMemoryStream;
...
Copia:=TMemoryStream.Create;
...
LaTabla.SaveToStream(Copia);
...
LaTabla.LoadFromStream(Copia);
When loading from the stream, I get an
In 'stream:' (line 1 pos 1): Root element is missing.
error.
What I want to do is to back up the content of the grid and be able to restore it.
What is the mistake I make?