Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > GridView > Memory Leak Problems

Not answered Memory Leak Problems

Feed from this thread
  • Jamie avatar

    Posted on Feb 6, 2012 (permalink)

    We're evaluating the RadControls for use in our software, but are running into a bit of a brick wall with GridView. Our software allows the user to click items, then display data about them in the GridView. Each item that is chosen must refresh the grid, add new columns and rows, because the number of each required can vary. Every time the ItemsSource of the GridView is set, the memory used by the program shoots up 10meg or more, even though there are only a few rows being loaded in. 

    Any thoughts? The controls in general seem good, but this is unfortunately a deal breaker if we can't get it to work...

    We're running .NET 4.0 (C#), Win 7, 2011 Q3 RadControls Trial

    Reply

  • Vlad Vlad admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hi,

     Can you post more info about your scenario? Any grid settings? Data-binding? 

    All the best,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Jamie avatar

    Posted on Feb 6, 2012 (permalink)

    Sure. We're using a custom style, but when I set the grid to use the default style, the issue remains. The grid's using a number of groups and frozen columns. Virtualisation is on. Again though, I've removed each of these and the problem remains.

    The core of it is a DataTable, generated every time an item is requested, which is set as ItemsSource. 

    This is our xaml:               
    <telerik:RadGridView x:Name="StockGrid" Background="WhiteSmoke" CanUserFreezeColumns="True" RowIndicatorVisibility="Collapsed" IsSynchronizedWithCurrentItem="False" CanUserSelect="True" SelectionMode="Extended" SelectionUnit="Cell" GridLinesVisibility="Both"/>

    It seems to still occur even when the only C# reference to the table is

    StockGrid.ItemSource = ourDataTable;

    When this line is commented out, there's no leak, but obviously nothing shown on screen either. It's like whenever the new data is assigned to the table, the previous data remains in memory instead of being garbage collected.

    Reply

  • Vlad Vlad admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hello,

     Can you verify if the grid is not measured with infinity height (inside StackPanel, ScrollViewer, etc.)? What's the situation with standard WPF DataGrid in your scenario? 

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Jamie avatar

    Posted on Feb 6, 2012 (permalink)

    Just inside a few grids. I tested them with defined heights and widths, doesn't seem to make a difference. It is in a column of defined width, if that could make a difference. The standard DataGrid doesn't leak in the exact same position, but we really would prefer the RadControls grid for the advanced grouping/filtering etc.

    Reply

  • Vlad Vlad admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hi,

     Please send us the project (via support ticket) to check it locally what's going on.

    Kind regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > GridView > Memory Leak Problems
Related resources for "Memory Leak Problems"

WPF Grid Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]