Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
16993 | Jul 28,2004 05:26 PM UTC | Jul 29,2004 11:45 AM UTC | WinForms | 4 |
![]() |
Tags: GridControl |
System.IO.StringReader tr = new System.IO.StringReader(txtXML.Text);
System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(tr);
GridStyleInfo style = new GridStyleInfo();
style.ReadXml(reader);
reader.Close();
gridControl1.BaseStylesMap["Standard"].StyleInfo.ModifyStyle(style, Syncfusion.Styles.StyleModifyType.Override);
The GridStyleInfo.ReadXml only sets the properties respresented in the XML, leaving all the other properties of the new style object unset.
I think here is an explanation of this problem. In the standard basestyle, this is not acceptable as all properties need to be set here (even if they are only the default settings). Having unset properties in most style objects does not matter since they fall back on some parent style for any unset values. But the standard style is the ultimate parent and hence must be fully populated.
The code above avoids this problem by getting the XML set properties into a new style object, and then just overriding the properties in the standard style which were set in the XML.
I will discuss this problem with Stefan, the grid architect, to see if he thinks my explanation is correct, and if there is something we can do, or if the standard style will have to be handled as a special case in the manner of the code above. 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.
This page will automatically be redirected to the sign-in page in 10 seconds.