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.