Oct 07, 2015, 1:25 PM
-
-
Oct 09, 2015, 10:43 AMHi @AbdallahAshour,
I remember a similar issue happened before, but has been fixed. Though, you might face a different case.
Could you, please, specify what Ext.NET version are you dealing with? -
Oct 10, 2015, 7:16 AMhi @Daniil ,
i am dealing with (Ext.NET 3.2.1) -
Oct 12, 2015, 6:22 AMThanks for the answer. I think the issue that I mentioned has been resolved in 3.2.1 and you are probably facing a different issue.
Could you, please, provide a test case? -
Oct 13, 2015, 7:38 AMhi @Daniil,
this is sample example ,it simulate my problem with store,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" language="javascript"> var filldata = function () { App.direct.filldata({ success: function (response) { }, failure: function (msg) { Failure(msg, 'Error '); } }); } var filldataTest2 = function () { App.direct.filldataTest2({ success: function (response) { }, failure: function (msg) { Failure(msg, 'Error '); } }); } var Failure = function (msg, strTitel) { Ext.Msg.show({ title: strTitel , msg: Ext.util.Format.ellipsis(msg, 2000) , icon: Ext.Msg.ERROR , buttons: Ext.Msg.OK , minWidth: 1200 > String(msg).length ? 360 : 600 }); var t = setTimeout("Ext.net.Mask.hide();", 1000); }; </script> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { if (!X.IsAjaxRequest) { int columns = 100; Model m = new Model(); Store1.Model.Add(m); for (int c = 0; c < columns; c++) { string name = "Field" + c; m.Fields.Add(name); GridPanel1.ColumnModel.Columns.Add(new Column { DataIndex = name, Text = name }); } } } protected void Store1_ReadData(object sender, StoreReadDataEventArgs e) { try { int rows = 200000; int columns = 100; //List<object> data = new List<object>(rows); System.Data.DataTable dt = new System.Data.DataTable(); for (int c = 0; c < columns; c++) { dt.Columns.Add("Field" + c); } for (int r = 0; r < rows; r++) { //Dictionary<string, string> rowData = new Dictionary<string, string>(); System.Data.DataRow dr = dt.NewRow(); for (int c = 0; c < columns; c++) { string name = "Field" + c; //rowData[name] = string.Format("Cell_{0}_{1}", r, c); dr[name] = string.Format("Cell_{0}_{1}", r, c); } dt.Rows.Add(dr); // data.Add(rowData); } Store1.Data = dt; Store1.DataBind(); } catch (Exception ex) { X.Msg.Show(new MessageBoxConfig { Title = "Er", Message = ex.Message.ToString(), Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.WARNING, }); } } </script> </head> <body> <form id="form1" runat="server"> <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray"> <Listeners> <BeforeAjaxRequest Handler="Ext.net.Mask.show({msg:'Loading... '});" /> <AjaxRequestComplete Handler="Ext.net.Mask.hide();" /> <AjaxRequestException Handler="Ext.net.Mask.hide();" /> </Listeners> </ext:ResourceManager> <div> <table> <tr> <td> <ext:Button ID="Button1" runat="server" Text="get 22" Icon="PageExcel"> <Listeners> <Click Handler="filldataTest2();" /> </Listeners> </ext:Button> </td> </tr> <tr> <td> <ext:GridPanel ID="GridPanel1" Height="600" Width="1000" runat="server" Title="Grid"> <Store> <ext:Store runat="server" ID="Store1" OnReadData="Store1_ReadData"> <Proxy> <ext:PageProxy /> </Proxy> </ext:Store> </Store> <Plugins> <ext:BufferedRenderer ID="BufferedRenderer1" runat="server" /> </Plugins> <ColumnModel ID="ColumnModel1" runat="server"> </ColumnModel> <%-- <BottomBar> <ext:PagingToolbar ID="gpNofunctionPagingToolBar" runat="server" PageSize="10" HideRefresh="true" StoreID="Store1"> <Plugins> <ext:ProgressBarPager runat="server" ID="ProgressBarPager1Nofunction"> </ext:ProgressBarPager> </Plugins> </ext:PagingToolbar> </BottomBar>--%> </ext:GridPanel> </td> </tr> </table> </div> </form> </body> </html>
thank you -
Oct 15, 2015, 8:48 AMThank you.
I am able to reproduce OutOfMemoryException without Ext.NET. A resulting object is just too huge.
Example
<%@ Page Language="C#" %> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { try { int rows = 200000; int columns = 100; System.Data.DataTable dt = new System.Data.DataTable(); for (int c = 0; c < columns; c++) { dt.Columns.Add("Field" + c); } for (int r = 0; r < rows; r++) { System.Data.DataRow dr = dt.NewRow(); for (int c = 0; c < columns; c++) { string name = "Field" + c; dr[name] = string.Format("Cell_{0}_{1}", r, c); } dt.Rows.Add(dr); } } catch (Exception ex) { this.Label1.Text = ex.Message; } } </script> <!DOCTYPE html> <html> <head runat="server"> <title>OutOfMemoryException</title> </head> <body> <form runat="server"> <asp:Label ID="Label1" runat="server" /> </form> </body> </html>
-
Oct 20, 2015, 9:32 AM
-
Jan 11, 2016, 2:13 PMI am sorry for the delay in answering.
Well, I am afraid there is just no enough memory to process that amount of data (100000 rows x 100 columns). I don't quite see any bottleneck in astore.DataBind();
call.
Similar Threads
-
[CLOSED] Clone store to another store and fill check box in java script
By imaa in forum 1.x Legacy Premium HelpReplies: 3Last Post: Feb 21, 2012, 10:49 AM -
Grid Store Record.set() not update all store records when pagination enabled
By thanushka in forum 1.x HelpReplies: 1Last Post: Dec 22, 2011, 6:17 AM -
[CLOSED] Store: Is it possible to QueryBy a store with another store?
By nhg_itd in forum 1.x Legacy Premium HelpReplies: 4Last Post: Nov 03, 2011, 9:38 AM -
[CLOSED] Access Grid Data Store and manually store to database
By macap in forum 1.x Legacy Premium HelpReplies: 8Last Post: Oct 05, 2011, 8:52 AM -
GridPanel/ Store: How to read all records from Grid or Store control at Server side
By jigpatel06 in forum 1.x HelpReplies: 1Last Post: Nov 01, 2010, 9:00 PM