GridGroupingControl changes appearance after ApplyXmlSchema
Hello.


Attachment: WindowsFormsApp1_39f393f8.zip
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
SIGN IN To post a reply.
3 Replies
AA
Arulraj A
Syncfusion Team
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,
Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/WindowsFormsApp1-1483237949
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
JA
Jhonathan Aristizabal
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.
AA
Arulraj A
Syncfusion Team
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; |
Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/WindowsFormsApp11443521244
Please let me know if you have any concerns.
Arulraj A
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
JA Jhonathan Aristizabal
- Dec 6, 2018 12:41 PM UTC
- Dec 17, 2018 12:00 PM UTC