Copying the GridControl

Hi, I just want to copy the whole content of the GridControl grid and store in some collection. I am doing like below System.IO.MemoryStream s = new System.IO.MemoryStream(); gd.SaveBinary(s); m_UserFilterHashTable.Add(filterName,s); and retrieving like GridControl grid = new GridControl(GridModel.LoadBinary( (System.IO.MemoryStream) myEnumerator.Value)); m_RowFilters.GridCtrl = grid1; so i am getting below error End of Stream encountered before parsing was completed. Is there any other method where we can copy whole content of the Gridcontrol.

1 Reply

AD Administrator Syncfusion Team December 22, 2004 07:20 AM UTC

Use LoadBinary/SaveBinary on the GridModel. Here is a minimal sample showing how you can use LoadBinary/SaveBinary to create a duplicate grid. DuplicateGrid_8564.zip

Loader.
Up arrow icon