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
1105
FormulaRowIndexSource
posted

We are currently on Infragistics version 13.2 of win forms.

Our current implementation of the UltraWinGrid uses a combination of the following features:

-  Row Filters

-  Group by a single column

-  An unbound column with data derived from a formula

-  A custom summary on that unbound column that is itself derived from a formula Sum([a] - Sum([b]) / 100

FormulaRowIndexSource is not set (so it defaults to VisibleIndex)

On Application start, a data table is bound to the grid and all of the above happens except for the row filter value.  Summary values are correct.  However, when the user sets a filter value on the unbound column (i.e. <= 15000) upon filter evaluation the grid throws the following exception:

System.IndexOutOfRangeException: Index was outside the bounds of the array.

   at Infragistics.Shared.SparseArray.ValidateIndex(Int32 index)

   at Infragistics.Shared.SparseArray.GetItem(Int32 index, ICreateItemCallback createItemCallback)

   at Infragistics.Shared.SparseArray.GetItem(Int32 index)

   at Infragistics.Win.CalcEngine.UCRecalcChain.HSparseArray.get_Item(Int32 index)

   at Infragistics.Win.CalcEngine.UCRecalcChain.get_Item(Int32 index)

   at Infragistics.Win.CalcEngine.UCRecalcChain.RemoveDisposedReferences()

   at Infragistics.Win.CalcEngine.UltraCalcEngine.DisposeReferences()

   at Infragistics.Win.CalcEngine.UltraCalcEngine.ProcessTopologicalEvent(QueueInfo item)

   at Infragistics.Win.CalcEngine.UltraCalcEngine.CleanTopologicalEventQueue(Int64 ticks)

   at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.Infragistics.Win.CalcEngine.IUltraCalcManager.ProcessEventQueue()

   at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureFiltersEvaluated()

   at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureFiltersEvaluated()

   at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.VerifyAgainstScrollVersion()

   at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.get_VisibleCount()

   at Infragistics.Win.UltraWinGrid.RowsCollection.GetVisibleRowCount(Boolean includeSpecialRows)

   at Infragistics.Win.UltraWinGrid.RowsCollection.get_VisibleRowCount()

   at Infragistics.Win.UltraWinGrid.UltraGridFilterRow.ApplyNewFiltersHelper(ColumnFilter origColumnFilter, ColumnFilter newColumnFilter, UltraGridFilterRow filterRow, Boolean fireFilterCellValueChangedEvent, RowsCollection rows)

   at Infragistics.Win.UltraWinGrid.UltraGridFilterRow.ApplyNewFiltersHelper(ColumnFilter origColumnFilter, ColumnFilter newColumnFilter, UltraGridFilterRow filterRow, RowsCollection rows)

   at Infragistics.Win.UltraWinGrid.UltraGridFilterRow.ApplyFilters(UltraGridColumn column, Boolean commitEditValues)

   at Infragistics.Win.UltraWinGrid.UltraGridFilterCell.ApplyFilters()

Seeing that the FormulaRowIndexSource can be a culprit, I tried changing it to RowIndex.  This eliminated the exception.  However, my summary values were no longer correct (they calculated as if all of the rows were visible, not just on the filtered out rows).
When I test this same scenario on Infragistics 12.2 (using the default of visible index) I don't get an exception AND i get the correct summary values.
Any suggestions?  I'm a bit stumped.
Thanks in advance
Parents Reply Children
No Data