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,
You have to archive and attach the xml file from the options submenu, when you create or edit your forum post. Click the More dropdown button on the top right of your last post and click edit, then in the options submenu click on Add/Update button and upload the file.
Thanks for the response! I understand all that and have already went down that path. The problem is that it is actually throwing the unhandled exception just loading the xml. It has nothing to do with the Grid. Tell me where I can send you the XML file and you can load it like I have below.
UltraGridLayout persistedLayout = new UltraGridLayout(); try { byte[] bytes = File.ReadAllBytes("path to the file"); MemoryStream memoryStream = new MemoryStream(bytes); persistedLayout.LoadFromXml(memoryStream); } catch { //It catches here just loading the file. }
Thank you for posting in our forums!
It seems that you try to add or you already have custom summary cell`s settings object that does not implement ICustomSummaryCalculator interface. UltraGrid actually does not serialize custom summary cell`s settings, since it is an object of interface type with custom logic that can be implemented on any other object. Therefore if you are adding a new custom summary settings to the band`s collection of the UltraGrid, you have to use another constructor with parameter of class that implements ICustomSummaryCalculator interface. For further reference about appropriate constructor`s type and implementation of the ICustomSummaryCalculator interface, see the following documentation page:
http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/?page=Infragistics4.Win.UltraWinGrid.v14.1~Infragistics.Win.UltraWinGrid.SummarySettingsCollection~Add(SummaryType,ICustomSummaryCalculator,UltraGridColumn,SummaryPosition,UltraGridColumn).html
Please let me know if you need any further assistance or I am missing something.