Hello,
a few users of one of our customers currently experience the following issue when our program calls Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories).
The stream is a memory stream and propertyCategories is set to PropertyCategories.All.
This results in a System.Reflection.TargetInvocationException.
The strange thing about this is, that no matter the source of the XML (in this case it is actually created in memory and loaded from anywhere) this fails. I have compared the XML with the XML on a machine where it worked and did not find any significant differences.
This issue on comes up on very few specific computers and not anywhere else.
We have checked the GAC and the folder our software has been deployed in and there are no anomalies either.
The users culture is US English.
Has anybody else experienced a similar error?
Here is the call stack
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Infragistics.Win.UltraWinGrid.SortedColumnsCollection..ctor(SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadHelper(Stream stream, PropertyCategories propertyCategories, IFormatter formatter)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(Stream stream, PropertyCategories propertyCategories)
Best regards
Sebastian PeschtiesLogimatic Germany GmbH
Hi, I can confirm the behavior mentioned above.
We’ve had the same issues moving from 6.3 to 8.2 to 9.1 and have always had to make the customer scrap their saved grid settings (always a pain). If this could be fixed, it would be much appreciated. We’ve used both the load and save method to read and write streams as well as the SaveAsXML and LoadFromXML methods and get the same error.
To duplicate the issue, here’s what you can do:
You should get the following error:
“Exception has been thrown by the target of an invocation.”
The inner exception is “Unable to cast object of type ‘Infragistics.Win.AppearanceHolder’ to type ‘Infragistics.Win.AppearanceHolder’.”
Source: Infragistics2.Win.UltraWinGrid.v9.1
Stacktrace: at Infragistics.Win.UltraWinGrid.SpecialBoxBase..ctor(SerializationInfo info, StreamingContext context)
at Infragistics.Win.UltraWinGrid.GroupByBox..ctor(SerializationInfo info, StreamingContext context)
This error occurred when loading the grid settings saved by a 6.3 version of the grid into a project using a 9.1 version of the grid (with hotfix).
Hi,
If you are using the latest service release and still having a problem, then it sounds like there's a bug there somewhere. In order to look into it, though, we need to be able to duplicate the problem. Can you provide a small sample project demonstrating the error?
tboy79 said:And, when you save the grid layout with "SaveAsXml", doesn't Infragistics save as the following? Isn't that specific version in a1 the problem???
No, the fact that the XML contains a version number is not a problem, because the binder resolves the corret assembly version when the layout is loaded.
As the above reply is shown. I am now writing the real reply.
Yes. I am using the latest 9.1 service release. (9.1.20091.2029)
And, when you save the grid layout with "SaveAsXml", doesn't Infragistics save as the following? Isn't that specific version in a1 the problem???
<a1:UltraGridDisplayLayout id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Infragistics.Win.UltraWinGrid/Infragistics2.Win.UltraWinGrid.v8.2"
>
xmlns:a1
="http://schemas.microsoft.com/clr/nsassem/Infragistics.Win.UltraWinGrid/Infragistics2.Win.UltraWinGrid.v8.2"
replied twice..and my replies don't even show up here....
I use 9.1 and latest hotfix. (9.1.20091.2029)
And, when I use saveAsXml, it saves as the following. As you can see, there is a specific version in a1 attribute. Isn't this the problem?
<
SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
SOAP-ENV:Body>
a1:UltraGridDisplayLayout id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/Infragistics.Win.UltraWinGrid/Infragistics2.Win.UltraWinGrid.v8.2"