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.
Unfortunately, activation email could not send to your email. Please try again.

Serialization: The problem of working XMLSerializer with GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

61922 Jun 4,2007 09:47 PM Jun 19,2007 09:16 AM ASP.NET Web Forms (Classic) 4
loading
Tags: GridGroupingControl
Ricky
Asked On June 4, 2007 09:47 PM

Our team are evaluating your grid and I use the following code to see if GridGroupingControl could be serialized via XMLSerializer:

XmlSerializer xs = new XmlSerializer(typeof(GridGroupingControl));
StreamWriter myWriter = new StreamWriter(Server.MapPath("Grid1_Properties.xml"));
ASPxGrid grid = new ASPxGrid();
xs.Serialize(myWriter, GridGroupingControl1);
myWriter.Close();

However, it fails. A exception is thrown whose message indicates that EnableTheming has existed in the namespace (this message is translated from my native language; my IDE mixes English with my native language and I don't know why)

So how to I solve it? We hope each UI controls we adopt can be serialized via XmlSerializer since it is a standard .NET component.

Thanks in advance.
Ricky

Ricky
Replied On June 4, 2007 09:53 PM

Please ignore the irrelevant line "ASPxGrid grid = new ASPxGrid();" in the code snippet.

Ricky.

>Our team are evaluating your grid and I use the following code to see if GridGroupingControl could be serialized via XMLSerializer:

XmlSerializer xs = new XmlSerializer(typeof(GridGroupingControl));
StreamWriter myWriter = new StreamWriter(Server.MapPath("Grid1_Properties.xml"));
ASPxGrid grid = new ASPxGrid();
xs.Serialize(myWriter, GridGroupingControl1);
myWriter.Close();

However, it fails. A exception is thrown whose message indicates that EnableTheming has existed in the namespace (this message is translated from my native language; my IDE mixes English with my native language and I don't know why)

So how to I solve it? We hope each UI controls we adopt can be serialized via XmlSerializer since it is a standard .NET component.

Thanks in advance.
Ricky

Valli [Syncfusion]
Replied On June 5, 2007 09:03 AM

Hi Ricky,

Thank you for evaluating our Grid control.

We are currently working on our requirement and will update you within '2' days.

Regards,
Valli

Ricky
Replied On June 5, 2007 08:32 PM

Thanks a million.
Ricky.

>Hi Ricky,

Thank you for evaluating our Grid control.

We are currently working on our requirement and will update you within '2' days.

Regards,
Valli

Ramya R [Syncfusion]
Replied On June 19, 2007 09:16 AM

Hi Ricky,

We strongly apologize for this long delay in getting back to you.

I was not able to reproduce the issue that you have mentioned here.

When I use the coding provided by you, I get a exception as follows,

System.InvalidOperationException was unhandled by user code
Message="There was an error reflecting type 'Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl'."

Generally XML Serializer cannot be used to serialize a class which uses SortedList. Since our GridGroupingControl uses SortedList it is not serializable using XmlSerializer and it throws the above mentioned exception,

But you can serialize the Engine,LookAndFeel of the GridGroupingControl.

The Engine of the GridGroupingControl can be serialized as shown in the code snippet below,

string st = Server.MapPath(string.Empty) + "\\App_Data\\Serialization.xml";
XmlTextWriter xw = new XmlTextWriter(st, System.Text.Encoding.UTF8)
xw.Formatting = System.Xml.Formatting.Indented;
this.GridGroupingControl1.WriteXmlSchema(xw);
xw.Close();

Could you please let us know what part(ie. whether the Engine or LookAndFeel or etc..) of GridGroupingControl that you wish to serialize, so that it would help us in meeting your requirement?

Please let me know if you have any queries.

Thanks & Regards,
Ramya.

CONFIRMATION

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.

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.

;