Hi Gregory,Greetings from Syncfusion.We already have provided a knowledge base document to serialize/deserialize the different types of information in GridGroupingControl. Please make use of the KB in which the ConditionalFormattingCollection is saved and reused. The type of DataSource property can be used to implement the workaround for DataTable of GridGroupingControl.Please get back to us, if you have any other queries.Regards,Arulpriya
|
XmlDocument doc = new XmlDocument();
doc.Load("ConditionalSchema.xml");
string xmlString = doc.InnerXml;
dt_serialize.Rows[0]["Deserialize"] = xmlString; |
Hi Gregory,Thank you for the update.We could not understand your reported requirement with the provided details. So, please confirm us that whether you are trying to serilize the data from GridColumnDescriptorCollection and need to remove the ShowButtons property of the columns while serializing. If yes, the serialization for a class will take backup for all the properties in the class and we regret to let you know that the reported scenario is not possible. If not, please provide more details about your exact requirement which will help us to assist you further.Regards,Arulpriya
| //To serialize the GridConditionalFormatDescriptor to XML file
GridConditionalFormatDescriptorCollection collection = this.gridGroupingControl1.TableDescriptor.ConditionalFormats;
collection.Remove("column name");
XmlSerializer xmlSerializer = new XmlSerializer(typeof(GridConditionalFormatDescriptorCollection)); XmlWriter writer = XmlWriter.Create("ConditionalSchema.xml");//Serialize the specified ConditionalFormat write the XML document.xmlSerializer.Serialize(writer, collection); |
Hi Gregory,Thank you for the update.To remove the ConditionalFormat or a ColumnDescriptor while serializing it, we would suggest that you to remove the column in the collection. Please make use of the below code example for further details.Example code
//To serialize the GridConditionalFormatDescriptor to XML file GridConditionalFormatDescriptorCollection collection = this.gridGroupingControl1.TableDescriptor.ConditionalFormats;collection.Remove("column name");XmlSerializer xmlSerializer = new XmlSerializer(typeof(GridConditionalFormatDescriptorCollection));XmlWriter writer = XmlWriter.Create("ConditionalSchema.xml");
//Serialize the specified ConditionalFormat write the XML document.xmlSerializer.Serialize(writer, collection);please get back to us if you need any further assistance.Regards,Arulpriya
Hi Gregory,Thank you for the update.We could understand the scenario that the GridGroupingControl does not have column descriptor for SerializedImageArray but it is generated in the xml file while serializing it. We have forwarded the query to our development team for further analysis and we will update you with proper details on 14th October 2020.Regards,Arulpriya