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
1284
Ultrawingrid - 'System.OutOfMemoryException' was thrown when more records are binded
posted

Hi,

  I am working on UltraWinGrid.

i am  getting the OutOfMemoryException when i bind more than 1 lakh records.. I have tested with the following records and the appropriate

results are mentioned below.

68,999 records - Able to display in the grid.

90,000 records - It Fails.

See the exception details below..

How to bind  a table which has more than 1 lakh records?

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at Infragistics.Win.UltraWinGrid.RowsCollection.AllocateNewRow()
   at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRowsHelper(IList boundList)
   at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows()
   at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty()
   at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.VerifyAgainstScrollVersion()
   at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.GetItemAtVisibleIndex(Int32 visibleIndex)
   at Infragistics.Win.UltraWinGrid.RowsCollection.GetRowAtVisibleIndex(Int32 visibleIndex, Boolean includeSpecialRows)
   at Infragistics.Win.UltraWinGrid.RowsCollection.GetFirstVisibleRow(Boolean includeSpecialRows)
   at Infragistics.Win.UltraWinGrid.RowsCollection.GetFirstVisibleRow()
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.get_FirstRow()
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.GetMaxScrollPosition(Boolean scrollToFill)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.EnsureScrollRegionFilled(Boolean calledFromRegenerateVisibleRows)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows()
   at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
   at Infragistics.Win.UltraWinGrid.ScrollRegionBase.WillScrollbarBeShown()
   at Infragistics.Win.UltraWinGrid.ViewStyleBase.AddBandHeaders(ColScrollRegion csr, UltraGridBand band)
   at Infragistics.Win.UltraWinGrid.ViewStyleVertical.RecreateHeaderList(ColScrollRegion csr)
   at Infragistics.Win.UltraWinGrid.ColScrollRegion.RegenerateVisibleHeaders()
   at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
   at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics()
   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.UltraWinGrid.UltraGridUIElement.InternalInitializeRect(Boolean verify)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.GetUIElement(Boolean verify, Boolean forceInitializeRect)
   at Infragistics.Win.UltraWinGrid.ColScrollRegion.get_SafeExtent()
   at Infragistics.Win.UltraWinGrid.ColScrollRegion.get_ClippedExtent()
   at Infragistics.Win.UltraWinGrid.ColScrollRegion.CheckIfSizeChanged()
   at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.CheckIfSizeChanged()
   at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
   at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
   at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(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)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.HostingProcess.Utilities
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
Microsoft.VisualStudio.HostingProcess.Utilities.Sync
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities.Sync/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Infragistics2.Win.UltraWinEditors.v8.1
    Assembly Version: 8.1.20081.1000
    Win32 Version: 8.1.20081.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinEditors.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinEditors.v8.1.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.configuration/2.0.0.0__b03f5f7f11d50a3a/System.configuration.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Serialization.Formatters.Soap
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/2.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

System.Data.OracleClient
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data.OracleClient/2.0.0.0__b77a5c561934e089/System.Data.OracleClient.dll
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll

Infragistics2.Win.v8.1
    Assembly Version: 8.1.20081.1000
    Win32 Version: 8.1.20081.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.v8.1.dll
----------------------------------------
Infragistics2.Win.UltraWinStatusBar.v8.1
    Assembly Version: 8.1.20081.1000
    Win32 Version: 8.1.20081.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinStatusBar.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinStatusBar.v8.1.dll
----------------------------------------
Infragistics2.Shared.v8.1
    Assembly Version: 8.1.20081.1000
    Win32 Version: 8.1.20081.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Shared.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Shared.v8.1.dll
----------------------------------------
Infragistics2.Win.UltraWinGrid.v8.1
    Assembly Version: 8.1.20081.1000
    Win32 Version: 8.1.20081.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Infragistics2.Win.UltraWinGrid.v8.1/8.1.20081.1000__7dd5c3163f2cd0cb/Infragistics2.Win.UltraWinGrid.v8.1.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Thanks

Ashok

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    I tried this out and it works fine for me. I am able to create a grid with 100,000 rows with no problems. And I know from the forums that there are many others using the grid with far more rows than that.

    One thing I noticed is that you are using the release version of the v8.1 grid. Perhaps you need to get the latest hot fix. There may have been a bug in the older version.

Children
No Data