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

GridGroupingControl changes appearance after ApplyXmlSchema

Thread ID:

Created:

Updated:

Platform:

Replies:

141338 Dec 6,2018 12:41 PM UTC Dec 17,2018 12:00 PM UTC WinForms 3
loading
Tags: GridGroupingControl
Jhonathan Aristizabal
Asked On December 6, 2018 12:41 PM UTC

Hello.


I am having an issue with the GridGroupingControl after saving the schema to a variable and trying to restore, the control loses the column header and row header style, I attached a sample project demonstrating the issue.
Environment
Visual Studio Community 15.9.3
Syncfusion 16.2.0.46 (The attached sample uses 16.3.0.36).

Grid with Style


Grid after pressing save then load





Attachment: WindowsFormsApp1_39f393f8.zip

Arulraj A [Syncfusion]
Replied On December 7, 2018 07:23 AM UTC

Hi Jhonathan, 

Thanks for using Syncfusion product. 

To deserialize the GridGroupingControl with appearance settings, you could use the ApplyXmlLookAndFeel method. Please refer the below code example and modified sample. 

Code example 
using (var stringReader2 = new StringReader(layoutData1)) 
{ 
    using (var xmlReader = XmlReader.Create(stringReader2)) 
    { 
        gridGroupingControl1.ApplyXmlLookAndFeel(xmlReader); 
    } 
} 
 
Please refer the following UG link,  
 
Note: 
In your code part, you have set the Metro theme before assigning the datasource. So, font settings are restored when assigning the datasource for the grid. So, font changes will appear when you try to deserialize the grid using ApplyXmlLookAndFeel method. 

Please let us know if you need any further assistance on this. 

Arulraj A 


Jhonathan Aristizabal
Replied On December 14, 2018 09:24 PM UTC

Hello Arulraj,


I have a question, why does the grid change my Font if I havent stablished it before hand, and why are some settings different after loading the LookAndFeel from the stored variable. Below I share some pictures from the project you sent me ilustrating the diferences.




Arulraj A [Syncfusion]
Replied On December 17, 2018 12:00 PM UTC

Hi Jhonathan, 

Thanks for your update. 

As per our previous update in your code part, you have set the metro theme in designer and then you have reset the DataSource for GridGroupingControl. So, font setting are reset after assigning the datasource for GridGroupingControl. When you try to deserilaize the grid appearance using ApplyXmlLookAndFeel method metro theme font settings are applied properly. In order to overcome this scenario, you are in need to set the Metro theme after assigning the DataSource for GridGroupingControl. Please refer the following code example and the sample. 
 
C# 
bindingSource1.DataSource = datos; 
bindingSource1.ResetBindings(false); 
this.gridGroupingControl1.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro; 


Please let me know if you have any concerns. 

Arulraj A 


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.

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

;