The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello,
the following easy code worked in SF 3.3 and .NET 1.1 and throws an exception in 4.1. CellValueType isn''t stored correctly.
If I change the produced xml from
to System.String
no exception is thrown.
void SerializeDeserialize()
{
GridStyleInfo info = new GridStyleInfo();
info.CellValueType = typeof(string);
info.Format = "G";
MemoryStream memStream = new MemoryStream(1000);
XmlSerializer serializer = new XmlSerializer(info.Store.GetType());
serializer.Serialize(memStream, info.Store);
System.Text.Encoding encoder = System.Text.Encoding.GetEncoding("windows-1252");
string xml = encoder.GetString(memStream.GetBuffer());
memStream = new MemoryStream(encoder.GetBytes(xml));
GridStyleInfo info2 = (GridStyleInfo)serializer.Deserialize(memStream);
}
Any Ideas?
Thanks,
Uwe
Sorry, there are some errors in the previous post:
The last line should read:
GridStyleInfoStore info2 = (GridStyleInfoStore)serializer.Deserialize(memStream);
The XML won''t post correctly, so I try it in text:
The CellValueType is empty but should have System.String as content.
Thanks,
Uwe
UWUwe WittigDecember 19, 2005 07:58 AM UTC
Hello,
I posted this twice (one time in the Grid Forum)because the site gave me an error. The post in the Grid forum was answered satisfactorily.
Thanks,
Uwe