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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC Loading schema falls back to SystemTheme

Thread ID:

Created:

Updated:

Platform:

Replies:

104538 Jul 27,2012 01:59 PM UTC Jul 31,2012 11:33 AM UTC WinForms 3
loading
Tags: GridControl
Mr. Sascha Wald
Asked On July 27, 2012 01:59 PM UTC

We store and load the schema of a groupinggridControl in a XML, as mentioned in your samples (XML Serialization Demo):

            FileDialog dlg = new OpenFileDialog();
                dlg.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*" ;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                        XmlReader xr = new XmlTextReader(dlg.FileName);
                        GridEngine engine = GridEngine.CreateFromXml(xr);
                        if (engine != null)
                                this.gridGroupingControl1.Engine.InitializeFrom(engine);
                        xr.Close();
                }  

 

The problem: in Designer we setup the theme to "Office2007", but when the gridengine gets the xmlschema, it shows the layout of SystemTheme. It can be reproduced by simply deleting the xmlfile, then it is loaded correctly with "Office2007"

Any hint?

Have a nice weekend

 

 


Kalaiarasan B [Syncfusion]
Replied On July 30, 2012 04:50 AM UTC

Hi Sascha,

 

Thank you for contacting Syncfusion Forums

 

You could resolve this issue by serializing the Grid’s look and feel too. The below codes are an example to serialize the Grid with its look and feel into xml.

 

XmlTextWriter xw = new XmlTextWriter("GridSchema.xml", System.Text.Encoding.UTF8);

            XmlTextWriter xwApp = new XmlTextWriter("GridLooknFeel.xml", System.Text.Encoding.UTF8);

            xw.Formatting = System.Xml.Formatting.Indented;

            this.gridGroupingControl1.WriteXmlSchema(xw);

            this.gridGroupingControl1.WriteXmlLookAndFeel(xwApp);

            xw.Close();

            xwApp.Close();

 

 

XmlReader xr = new XmlTextReader("GridSchema.xml");

                XmlReader xrApp = new XmlTextReader("GridLooknFeel.xml");

                this.gridGroupingControl1.ApplyXmlSchema(xr);

                this.gridGroupingControl1.ApplyXmlLookAndFeel(xrApp);

                xr.Close();

                scd.Format = "{Average:#}";

                xrApp.Close();

 

Here is the sample for you reference.

 

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Xml1374841421.zip

 

Please let us know if you have any concerns

 

Regards,

Kalai


Mr. Sascha Wald
Replied On July 30, 2012 06:23 AM UTC

Yeap, that works. Thank you.


Kalaiarasan B [Syncfusion]
Replied On July 31, 2012 11:33 AM UTC

Hi Sascha,

We are glad to hear that the issue is resolved on your side.

Please let us know if you have any other concerns

Thanks,
Kalai



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.

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

;