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
1369
IndexOutOfRange Exception
posted

Hi I am facing this exception when I am going to assign data source to grid.

Please tell.

I am using ultradatasource and here is the code.

  foreach (ColumnInfo colinfo in ColumnCollections)
                    {
                        this.ultraDataSource.Band.Columns.Add(colinfo.GetColumnKey(), Type.GetType("System.String"));
                    }

 this.ultraDataSource.Rows.SetCount(GetRowCount());
                    this.resultsGrid.DisplayLayout.LoadStyle = LoadStyle.LoadOnDemand;
                    this.resultsGrid.DataSource = this.ultraDataSource;    at this line below exceptionoccurs.

 This happens when I am laoding file above 1000000

This is exception text.

 {System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Infragistics.Shared.SparseArray.InsertRange(Int32 index, ICollection items)
   at Infragistics.Shared.SparseArray.AddRange(ICollection items)
   at Infragistics.Win.UltraWinGrid.RowsCollection.InitNonGroupByRows(IList fireInitializeRowOnTheseRows)
   at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRowsHelper(IList boundList)
   at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows()
   at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty()
   at Infragistics.Win.UltraWinGrid.RowsCollection.get_Count()
   at Infragistics.Win.UltraWinGrid.UltraGridBand.GetRowSelectorNumberWidth()
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.GetRowSelectorWidthDefault(UltraGridBand band)
   at Infragistics.Win.UltraWinGrid.UltraGridBand.get_RowSelectorWidthResolved()
   at Infragistics.Win.UltraWinGrid.UltraGridBand.get_RowSelectorExtent()
   at Infragistics.Win.UltraWinGrid.ColumnHeader.get_RowSelectorExtent()
   at Infragistics.Win.UltraWinGrid.ColumnHeader.get_Extent()
   at Infragistics.Win.UltraWinGrid.UltraGridBand.CalculateBandMetrics(UltraGridBand priorBand)
   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.UltraGridLayout.ApplyLoadedBands()
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated(BindingManagerBase bindingManager)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated()
   at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember)
   at Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource(Object value)
   at Thomson.Financial.Framework.Data.MarketQA.QalResultView.ResetGridBinding()

Parents
  • 469350
    Offline posted

    Hi Syed,

    There's not much here to go on. 

    What version of the grid are you using? Do you have the latest Hot Fix? I remember some problems with the SparseArray that were fixed a long time ago, so maybe you are using an old version. 

    Another reason for an error like this is if your application is using multiple threads and you are trying to bind across the threads. 

Reply Children