Grid.PerformAction(UltraGridAction.Copy); is causing following exception.
i have 80,000 rows and 19 columns. i selected all rows and when i perform copy by above statement i get exception.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
at System.Text.StringBuilder.Append(String value)
at Infragistics.Win.UltraWinGrid.MultiCellOperationInfo.GetHtmlText(CellValuesCollection cellValues)
at Infragistics.Win.UltraWinGrid.MultiCellOperationInfo.GetClipboardDataObject(CellValuesCollection cellValues, Boolean fireBeforeMultiCellOperationEvent)
at Infragistics.Win.UltraWinGrid.MultiCellOperationInfo.PerformMultiCellOperation(MultiCellOperation operation)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.PerformMultiCellOperation(MultiCellOperation operation)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.PerformAction(UltraGridAction actionCode, Boolean shiftKeyDown, Boolean ctlKeyDown)
at Infragistics.Win.UltraWinGrid.UltraGrid.PerformAction(UltraGridAction actionCode, Boolean shift, Boolean control)
at Infragistics.Win.UltraWinGrid.UltraGrid.PerformAction(UltraGridAction actionCode)
Any help would be appreciated..
Thanks,
Kiran
Hi,
This sounds like it might be a bug. I forwarded this thread over to Infragistics Developer Support so they can check it out.
Is this bug already fixed? or are there any news about this issue? cause I am experiencing the same problem. I am with v10.3
Hello Acgc,
I made small sample to test this behavior. In my sample I created 20 columns and 100 000 rows and everything works properly. Of course this is time consuming operation and depend of your local machine, because we copy 2 000 000 cells. Maybe you could use other approaches to export the UltraGrid`s content. For example UltraGridExcelExporter.
Please take a look at the attached sample and video file and let me know if you have any questions.
I suppose that 5 M rows are too much. I doubt there is anything you can do. Maybe you could try to export data to excel file using UltraGridExcelExporter. Let me know if you have any further questions
Regards
Hello Georgi,
Thanks for the reply, the problem is that I am importing huge amount of data, I made a small application and it goes ok until it reaches more than 5 M rows.
foreach (DataRow row in dataTable.Rows)
{
((DataView)logUltraGrid.DataSource).Table.ImportRow(row);
logUltraGrid.Rows[logUltraGrid.Rows.Count - 1].RefreshSortPosition();
}
and I get the following exception:
Exception of type 'System.OutOfMemoryException' was thrown.
Is there another way to handle this amount of data? I read something about VirtualMode would it be another approach?