I have a grid layout saved to XML and it contain when I load it into an UlraGridLayout I get the following error.
Unhandled exception on background thread: If summaryType is Custom, then a valid instance of ICustomSummaryCalculator must be passed in.
I haven't even loaded the layout onto the grid. I am simply loading the layout into a variable for evaluation.
What is happening here??
Thanks
-Ken
Hello Ken,
I am just checking about the progress of this issue.
Please let me know if you need any further assistance on it or if I am missing something.
Thank you for using Infragistics Components!
Although the upgrade to Infragistics 14.1 will prevent saving the custom summaries cells of the UltraGrid`s layout, loading xml file that contains custom summaries serialized with Infragistics 11.1 will still throws an exception. Therefore the attached xml file have to be edited manually using one of the possible approaches listed in my previous post.
Please let me know if you need any further assistance.
Thanks for all the info! I am guessing I won't see the problem with 14.1 of infragistics?
If that is the case we will be updating in the next week to that version.
Checking out the XML that is attached.
Thank you for the provided xml file!
Based on the provided information, I have managed to reproduce your issue. Since in the xml file you have two summary settings cells of type custom [<SummaryType>5</SummaryType>], runtime when the file is loading it throws exception because it is looking for the ICustomSummaryCalculator interface. As I mentioned we do not serialize interface objects like summaries of type custom, so the UltraGrid`s layout does not expect to find them in the xml. It seems that it was a bug on our previous Infragistics versions as 11.1, the version that your xml file has been serialized with.
Therefore in order to keep the values of the summary cells true, you have to change the SummaryType to appropriate ones that fits the summary requirements. I have noticed that the names of the summaries probably ends to the types that they should display (ContractValueSum and OrderNumberCount). So I have changed them to [<SummaryType>1</SummaryType>] and [<SummaryType>4</SummaryType>] respectively. There is no guarantee that this is the right scenario in your case, but it is the fastest approach with decent chances of success. On the other hand if the summaries logic is more complicated than the standard summary types, you can change them to external. The last possible approach is just to delete the summary settings from the xml file, in case you are not going to use summaries cells in the UltraGrid.
For further reference about the SummaryType enumeration and external summary calculations, see the following documentation pages: http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.SummaryType.html http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/?page=WinGrid_Performing_External_Summary_Calculations.html
Please refer to the attached file on the bottom of this post, where the xml is modified as explained in the above sentences.
I am waiting for your feedback.
Ok, here it is. Please let me know when you have had a chance to load the file via the code sample I posted.