How to save the contents of a Grid in memory rather than a file system to export to another grid
9 Dec 20191 minute to read
You can save the contents of a grid in memory rather than writing to a file system. This can be done using SaveSoap or SaveBinary method of GridControl. The below code snippet illustrates how this can be done.
MemoryStream s = new MemoryStream();
gridControl1.Model.SaveSoap(s);
s.Position = 0;
gridControl1.Model = GridModel.LoadSoap(s);
gridControl2.Model = GridModel.LoadSoap(s);
Dim s As MemoryStream = New MemoryStream()
gridControl1.Model.SaveSoap(s)
s.Position = 0
gridControl1.Model = GridModel.LoadSoap(s)
gridControl2.Model = GridModel.LoadSoap(s)