We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Serialization

Thread ID:





15239 Jun 15,2004 11:09 AM UTC Jun 15,2004 01:07 PM UTC WinForms 1
Tags: GridControl
Alex Nesterov
Asked On June 15, 2004 11:09 AM UTC

Hi! I have a problem with serialization of Essential Suite Grid v1.5. The Grid in my application has GridStyleInfo.CellType = "FormulaCell". So, when I try to serialize it, an exception is thrown, which says that Syncfuison.Windows.Forms.Grid.GridFormulaCellModel is not marked as serializable. I decided to apply GridStyleInfo.CellType = "TextBox" to the Grid, to serialize it and then to apply GridStyleInfo.CellType = "FormulaCell" again. I do it in the following way: private GridStyleInfo gridStyleInfo = new GridStyleInfo(); private GridBaseStyle gridBaseStyle = new GridBaseStyle(); Then in constructor after InitializeComponent() I write: this.gridBaseStyle.Name = "Standard"; this.gridStyleInfo.CellType = "FormulaCell"; this.gridBaseStyle.StyleInfo = this.gridStyleInfo; this.gridControl.BaseStylesMap.AddRange(new GridBaseStyle[] {this.gridBaseStyle}); And in the method, which serializes the Grid to a file, I write: private void Save() { this.gridStyleInfo.CellType = "TextBox"; this.gridBaseStyle.StyleInfo = this.gridStyleInfo; this.gridControl.BaseStylesMap.AddRange(new GridBaseStyle[] {this.gridBaseStyle}); this.gridControl.SaveSoap("Test.xml"); this.gridStyleInfo.CellType = "FormulaCell"; this.gridBaseStyle.StyleInfo = gridStyleInfo; this.gridControl.BaseStylesMap.AddRange(new GridBaseStyle[] {this.gridBaseStyle}); } Ok, I understand, that the styles set in the constructor and in the method Save() overlap each other, but all the same stay in memory. Can anybody help me? Thanks in advance.

Administrator [Syncfusion]
Replied On June 15, 2004 01:07 PM UTC

You might want to update to or 2.0.x as these versions support serialization of the formula cells. I think the problem may be that just changing CellType from FormulaCell to TextBox does not do anything to the information that is stored in the style.FormulaTags. And the serialization of these objects is not supported in 1.5. So, if you wanted to do this, in addition to changing out celltypes, you would also have to make sure all teh FormulaTags were null.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon