Hi,I am using ultraGrid to display a large amount of data. The grid works well for merely displaying for even about 3,00,000 record(100 MB). But the issue rises while exporting the data to pdf or excel document. While export the application throws out of memory exception even for data as small as 12MB for PDF and 30 MB for Excel files. Could you explain why this instability occurs and suggest a way out of this?
and plz find below the stack trace of the expception.
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.RowsCollection.EnsureFiltersEvaluated() 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.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.UltraGridLayout.ApplyLoadedBands() at Infragistics.Win.UltraWinGrid.UltraGrid.Export(IUltraGridExporter exporter) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, ISection section) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, Report report) at Infragistics.Win.UltraWinGrid.DocumentExport.UltraGridDocumentExporter.Export(UltraGrid grid, String fileName, GridExportFileFormat fileFormat) at Liberty.Framework.ControlLibrary.LibertyGrid.ExportDataToPDF() in C:\Data\Woden\NetX360_2010_R1B\win_winnetx_nxg\Liberty\Control Library\LibertyGrid\Menu.cs:line 1975
Hello,
Can you please provide me a sample which reproduces this issue? I created a sample for you and I am not able to reproduce. I have attached the sample I created, you may modify this one and send it back to me or you may create a new one to show the issue.
Asma,
Tested the given program by modifying the source code with PDF export changes (using UltraDocumentExporter with PDF export option).
It works fine for 30 thousand records but threw Out Of Memory exception when we try to export grid having data more than 300 thousand record. As the application in which we are using this PDF grid export may show records in hundreds of thousand, we frequently encounter this exception.
Could you please modify your program to do PDF export for grid having more than 300 thousand of records and see how it performorms for you ?
Hello Uthay,
Were you able to resolve your issue?
As there is limit to the amount of memory on every machine, that could be the reason I would expect it to fail.
If you can send me your sample I can take a look, to see if there is something we can optimize.