Greetings for everybody
I have had problems trying to export data to excel format from a grid with 34 columns, the data volume is 30,000 records aprox, when the query exceds 20,000 records, I get the next error:
Se produjo una excepción de tipo 'System.OutOfMemoryException'. en System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
en System.Web.UI.StateBag.Add(String key, Object value)
en System.Web.UI.WebControls.TableCell.set_Text(String value)
en Telerik.Web.UI.GridTableCell..ctor(Boolean useNbsp)
en Telerik.Web.UI.GridItem.CreateCellObject()
en Telerik.Web.UI.GridItem.Initialize(GridColumn[] columns)
en Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows)
en Telerik.Web.UI.GridItemBuilder.InitializeItem(Int32 dataSourceIndex, String& nextItemHierarchicalIndex, Boolean& itemIsInEditMode)
en Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group)
en Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls)
en Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
en Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
en System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
en System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
en System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
en System.Web.UI.WebControls.DataBoundControl.PerformSelect()
en Telerik.Web.UI.GridTableView.PerformSelect()
en System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
en Telerik.Web.UI.GridTableView.DataBind()
en Telerik.Web.UI.RadGrid.DataBind()
en Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)
en Telerik.Web.UI.RadGrid.RebindForExport()
en Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport()
en Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e)
en System.EventHandler.Invoke(Object sender, EventArgs e)
en System.Web.UI.Control.OnPreRender(EventArgs e)
en System.Web.UI.Control.PreRenderRecursiveInternal()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Here are the exporting options:
Grid1.ExportSettings.ExportOnlyData = true;
Grid1.ExportSettings.IgnorePaging = true;
Grid1.ExportSettings.OpenInNewWindow = true;
Grid1.MasterTableView.ExportToExcel();
could someone help me with some ideas?
Thanks
I have had problems trying to export data to excel format from a grid with 34 columns, the data volume is 30,000 records aprox, when the query exceds 20,000 records, I get the next error:
Se produjo una excepción de tipo 'System.OutOfMemoryException'. en System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
en System.Web.UI.StateBag.Add(String key, Object value)
en System.Web.UI.WebControls.TableCell.set_Text(String value)
en Telerik.Web.UI.GridTableCell..ctor(Boolean useNbsp)
en Telerik.Web.UI.GridItem.CreateCellObject()
en Telerik.Web.UI.GridItem.Initialize(GridColumn[] columns)
en Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows)
en Telerik.Web.UI.GridItemBuilder.InitializeItem(Int32 dataSourceIndex, String& nextItemHierarchicalIndex, Boolean& itemIsInEditMode)
en Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group)
en Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls)
en Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource)
en Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource)
en System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
en System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
en System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
en System.Web.UI.WebControls.DataBoundControl.PerformSelect()
en Telerik.Web.UI.GridTableView.PerformSelect()
en System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
en Telerik.Web.UI.GridTableView.DataBind()
en Telerik.Web.UI.RadGrid.DataBind()
en Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)
en Telerik.Web.UI.RadGrid.RebindForExport()
en Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport()
en Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e)
en System.EventHandler.Invoke(Object sender, EventArgs e)
en System.Web.UI.Control.OnPreRender(EventArgs e)
en System.Web.UI.Control.PreRenderRecursiveInternal()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Here are the exporting options:
Grid1.ExportSettings.ExportOnlyData = true;
Grid1.ExportSettings.IgnorePaging = true;
Grid1.ExportSettings.OpenInNewWindow = true;
Grid1.MasterTableView.ExportToExcel();
could someone help me with some ideas?
Thanks