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
2150
Wierd persistence issues for SummaryRowSettings.SummaryDefinitionCollection
posted

If I add SummaryRowSettings.SummaryDefinitionCollection to my xamGrid, I can no longer properly serialize and deserialize using the persistence manager.

I start getting exceptions (System.NullReferenceException) from InfragisticsWPF4.DataManager.v15.2 at Infragistics.SummaryDefinitionCollection.GetDefinitionsBySummaryExecution.

Please see the attached example.  My question comes in two parts.

  • Why is SummaryRowSettings added to my serialized data (see ColumnLayoutPersistenceSettings is minimal/

    OnlySpecified)

  • Given SummaryRowSettings is serialized, why when it is loaded do I get System.NullReferenceException

  The way to test is to first click "Save" and then "Load".   You may need to regen GridStrings.Designer.cs to get the project to run...

This persistence stuff is a bit frustrating  Any help would be greatly appreciated.

DkbGrid.zip
Parents
No Data
Reply
  • 2150
    Offline posted

    I played with this quite a bit today.  One possible workaround is similar to what I did previously when the PersistenceManager kept trying to serialize the entire ContextMenu of the XamGrid.  

    In order to avoid serializing unnecessary stuff that throws exceptions, you have to temporarily remove the unwanted "SummaryDefinitionCollection" members before saving.  Once saving is complete, you finally restore the collection again.

    Please let me know if there is a bug here somewhere (either in the serialization of stuff that doesn't match my "OnlySpecified" criteria, or in the NullReferenceException that is thrown from "GetDefinitionsBySummaryExecution")....

Children