Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
104
Freeze column and OutOfMemoryException
posted

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

Parents
  • 8736
    posted

    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.

    WDGCOl_fix.zip
Reply Children