Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
LoadFromXML error when using grid settings saved with conditional formats
posted

Hello, I am using SaveAsXML() to persist grid settings that include a very simple operator condition (i.e. if x = y then change bg color to red).  However every time I load the settings from XML, I get the following exception.  If I remove the conditional format and save grid settings then the LoadFromXML() method works fine.  I am afraid the error message does not give me too much to work with.....

By the way, I was able to reproduce this error in your sample app.  I added two buttons to the frmConditionalFormatting.vb form.  One button calls SaveAsXML() the other calls LoadFromXML().  After the form is loaded, I called the first button to save settings and then subsequently called the second button to load settings.  I got the same exception shown attached below.

 

 "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Hashtable.HashtableEnumerator..ctor(Hashtable hashtable, Int32 getObjRetType)
   at System.Collections.Hashtable.ValueCollection.GetEnumerator()
   at Infragistics.Win.ConditionValueAppearance..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)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.LoadFromXml(String filename)
   at DirectTrucking.frmList.TestToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Documents and Settings\DevUser1\My Documents\Visual Studio 2005\Projects\XXXXXXX\TestProject\TestForm1.vb:line 251"

  • 37774
    posted

    I'm pretty sure that this issue was fixed in a hotfix, so you should ensure that you have the latest version.  If you can reproduce this after installing the latest hotfix, you should contact Developer Support.

    -Matt