Hello, we are updating an old .NET 3.5 WinForm application that used an old version of Infragistics .NET Advantage 2 to .NET 4.5 and Infragistics 4, and are occasionally getting a ArgumentNullException in UltraWinGrid.FormulaTargetRefBase. Stack trace follows:
System.ArgumentNullException: Value cannot be null.Parameter name: containingFormulaRef at Infragistics.Win.UltraWinGrid.FormulaTargetRefBase..ctor(UltraGridLayout layout, FormulaRefBase containingFormulaRef, Object context) at Infragistics.Win.UltraWinGrid.SummaryValueReference..ctor(SummaryValue summaryValue) at Infragistics.Win.UltraWinGrid.SummaryValue.get_CalcReference() at Infragistics.Win.UltraWinGrid.RefSummaryValueCollection.RefSummaryValueCollectionEnumerator.GetAllMatchingSummaryValues(UltraGridBase grid, UltraGridRefBase referenceBeingEnumerated) at Infragistics.Win.UltraWinGrid.RefSummaryValueCollection.RefSummaryValueCollectionEnumerator..ctor(RefSummaryValueCollection collection) at Infragistics.Win.UltraWinGrid.RefSummaryValueCollection.GetEnumerator() at Infragistics.Win.CalcEngine.RangeCalcInfo.Initialize(UCRecalcChain recalcChain) at Infragistics.Win.CalcEngine.RangeCalcInfo.CreateNew(UCRecalcChain recalcChain) at Infragistics.Win.CalcEngine.UltraCalcEngine.Evaluate(Int64 ticks) at Infragistics.Win.CalcEngine.UltraCalcEngine.Recalc(Int64 ticks, Boolean isStartOfRecalcOperation) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcInternal(Int64 ticks) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalc(Int64 millis) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcSynchronous() at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.VerifyReCalc() at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.DirtyCalc(IUltraCalcReference reference, ValueDirtiedAction action) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.Infragistics.Win.CalcEngine.IUltraCalcManager.RemoveFormula(IUltraCalcFormula formula) at Infragistics.Win.UltraWinGrid.BandReference.VerifyGroupLevelSummaryFormulas() at Infragistics.Win.UltraWinGrid.RowsCollection.VerifyGroupByVersion() at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty() at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty() at Infragistics.Win.UltraWinGrid.RowsCollection.get_Count() at Infragistics.Win.UltraWinGrid.UltraGridGroupByRow.HasAnyVisibleChildRows() at Infragistics.Win.UltraWinGrid.UltraGridGroupByRow.get_Hidden() at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HiddenInternal() at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HiddenResolved() at Infragistics.Win.UltraWinGrid.RowScrollRegion.get_FirstRow() at Infragistics.Win.UltraWinGrid.RowScrollRegion.GetMaxScrollPosition(Boolean scrollToFill, Boolean ignoreScrollBoundsResolved) at Infragistics.Win.UltraWinGrid.RowScrollRegion.EnsureScrollRegionFilled(Boolean calledFromRegenerateVisibleRows) at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo) at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible) at Infragistics.Win.UltraWinGrid.ViewStyleBase.FitColumnsToWidth() at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics(Int32 pass) at Infragistics.Win.UltraWinGrid.BandsCollection.CalculateBandMetrics() at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper() at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics() at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo) at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible) at Infragistics.Win.UltraWinGrid.RowScrollRegion.PositionScrollbar(Boolean resetScrollInfo) at Infragistics.Win.UltraWinGrid.ScrollRegionBase.SetOriginAndExtent(Int32 origin, Int32 extent) at Infragistics.Win.UltraWinGrid.RowScrollRegion.SetOriginAndExtent(Int32 origin, Int32 extent) at Infragistics.Win.UltraWinGrid.DataAreaUIElement.ResizeRowScrollRegions() at Infragistics.Win.UltraWinGrid.DataAreaUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.DataAreaUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.DataAreaUIElement.set_Rect(Rectangle value) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify, Boolean syncMouseEntered) at Infragistics.Win.ControlUIElementBase.get_CurrentCursor() at Infragistics.Win.UltraControlBase.get_Cursor() at System.Windows.Forms.Control.WmSetCursor(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
We have an UltraWinGrid with a UltraCalcManager, a computed row, and a Group By feature. I suspect the problem is associated with the Group By as we can most often trigger the exception by rapidly toggling the Group By selection.
Upon further investigation, this may be because of the computed row; given the line:
this._ultraCalcManager.SetCalcSettings(this._ultraStatusBar, new Infragistics.Win.UltraWinCalcManager.CalcSettings("Test", null, "count ( [//_myGrid/Order/OrderNumber] )", "Text", Infragistics.Win.UltraWinCalcManager.CalcErrorIconAlignment.Default, null));
If I remove the line:
this._myGrid.CalcManager = this._ultraCalcManager;
I do not get the exception after toggling the Group By selection.
Hello,
This is not an expected result. Please attach your sample here and I will look it over to determine what is going wrong.
If you would prefer not to attach your sample on the public forum, please let me know and I will create a private case for you.