Hi,
I have a webdatagrid and want to freeze the column in code behide. The first time when grid binded , the memory was up from 2.33GB to 2.34GB in task manager, but when I refreshed this control and binded again, I saw the memroy is going up to 3.41GB, and got this exception.
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Exception of type 'System.OutOfMemoryException' was thrown.
The issue is caused by this code.
this.wdgGridView.Behaviors.ColumnFixing.FixedColumns.Add("Select", FixLocation.Left);
If I don't freeze the column, the memory is fine whatever how many times to bind, but when I freezed one column, the issue is happened.
If I reload whole page, it's fine, but I don't want to do that, I only want to refresh the webdatagrid in updatepanel only.
BTW, if I set EnableViewState is false, that will be fine, but if true, I will get this issue again. I want to keep EnableViewState is true.
WebDev.webServer40.ExE*32 was running out of memory.
Thanks,
Michael
Hello Michael,
I have used the line of code you have provided to reproduce the memory leak issue you described. I was not able to reproduce this behavior. I have attached mark and code behind I have used to test this behavior. I have tested this sample using Windows 7, NetAdvantage version 11.1.20111.2043, IE 8, and Visual Studio 2010.
If this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back.
WebDataGride has properties, AutoGenerateColumns="True", EnableViewState = "True"
Hi bhadresh,
I freezed the column in InitializeRow when row index is 0. Also have a button to refresh WebDataGrid control.
First, when the button clicked, WebDataGrid is binded and freezed the columns. The memory is fine, but when I click this button to rebind WebDataGrid again, I will see the memory was going up and got outof memory exception.
My environ is 2010 vol. 3 and IE 8. Visual Studio 2010.
I saw your code, it's a little different, I freezed the column in InitializeRow, instead of page load. I also did other test. Like, I freezed the column in design mode, if I don't click freeze icon, and click the refresh button, the memory is fine, but if the column is freeze when click the icon, and clicked refresh button, then the memory is running out.
Any idea, is it version issue?
My version is 2010 vol. 3