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. Image for the cookie policy date
close icon

GridFontInfo

Hi,

I am wondering if it is possible to serialize a GridFontInfo object. I have tried the WriteXml method, but I always get an empty string. Can you show me a small example how to serialize that object type?

Cheers,
Tom

1 Reply

AD Administrator Syncfusion Team February 15, 2007 03:03 PM UTC

Hi Tom,

If you want to write the only GridFontInfo object to XML, then you can use the below code snippet.

private void WriteFontInfoToXml(GridStyleInfo style, string Filename)
{
XmlTextWriter xw = new XmlTextWriter(Filename, System.Text.Encoding.Default);
xw.Formatting = Formatting.Indented;
xw.WriteStartElement("GridFontInfo");
xw.WriteElementString("Font",style.Font.ToString());
xw.WriteEndElement();
xw.Close();
}

Here is a minimal sample for implementation.
StyleSerialize.zip

Also refer to attached document for more details.
Serialize.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon