This is a migrated thread and some comments may be shown as answers.

Memory leak with radcombobox in grid?

4 Answers 45 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 16 Nov 2010, 08:51 PM

Hi, I have been troubleshooting a memory leak for the past couple weeks and I have narrowed it to the comboboxes in my grid.  Usually everytime I change the pagesize on my datapager or rebind my grid, the memory usage increases.  However if I remove the combobox from my grid then I don't have the memory leak.  I took this a couple steps further and stripped down the combobox and the grid so I just have a generic combo box in my grid as the only column, I still have the leak.

Below is the code for my grid, then outside grid I have a dropdown menu with a bunch of selections to change the pagesize on the pager.  Everytime the pagesize changes, the memory utilization goes up, it never comes down.  If I remove the combobox in the grid then I don't have this problem.

I know a lot of memory leak issues were resolved recently so I am using the Q3 release but still have the issue.  Thanks in advance for any help or guidance.



<telerik:RadBusyIndicator x:Name="busyIndicatorRels" BusyContent="Loading ..." Background="Transparent" BorderBrush="Transparent" Style="{StaticResource RadBusyIndicatorStyle}" >
                       <telerik:RadBusyIndicator.OverlayStyle>
                           <Style TargetType="Rectangle">
                               <Setter Property="Fill" Value="Transparent" />
                           </Style>
                       </telerik:RadBusyIndicator.OverlayStyle>
                       <Grid x:Name="RelGrid" Visibility="Collapsed">
                           <telerik:RadGridView HorizontalAlignment="Stretch" Name="rgvRels" AutoGenerateColumns="False" RowIndicatorVisibility="Visible"
           ItemsSource="{Binding PagedSource, ElementName=radDataPagerRel}" >
                               <telerik:RadGridView.Columns>                                    
                                   <telerik:GridViewDataColumn Header="Client" Width="160" SortMemberPath="ClientNum" 
                                               DataMemberBinding="{Binding LearnClient}" TextAlignment="Left">
                                       <telerik:GridViewDataColumn.CellStyle>
                                           <Style TargetType="telerik:GridViewCell">
                                               <Setter Property="Template">
                                                   <Setter.Value>
                                                       <ControlTemplate TargetType="telerik:GridViewCell">
                                                       <Border BorderBrush="DarkGray" BorderThickness="0,0,1,0" VerticalAlignment="Stretch" >
                                                           <telerik:RadComboBox x:Name="radClientCombo"                                                              
                                                                 />
                                                             
                                                           </Border>
                                                       </ControlTemplate>
                                                   </Setter.Value>
                                               </Setter>
                                           </Style>
                                       </telerik:GridViewDataColumn.CellStyle>
                                   </telerik:GridViewDataColumn>
                               </telerik:RadGridView.Columns>
                           </telerik:RadGridView>
                       </Grid>
                   </telerik:RadBusyIndicator>
                   <telerik:RadDataPager Name="radDataPagerRel" PageSize="10" AutoEllipsisMode="Both" DisplayMode="All" 
                                 Margin="10,0,10,0" NumericButtonCount="10" Visibility="Collapsed"  />

4 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 22 Nov 2010, 11:13 AM
Hi Kjell,

I tried to reproduce the problem, but to no avail. Could you please specify which version of Silverlight you use?

Best wishes,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Kevin Webb
Top achievements
Rank 1
answered on 22 Nov 2010, 06:47 PM
Hi George, We are having a similar problem.  Here is what we did to reproduce as well as exaggerate to show the scope of the leak.  Take the Radcombobox binding example from the telerik demos and put about 350 extra rows into the collection of Agency objects being returned from the AgencyViewModel (in the example there are 10).  If I run this example in IE the memory usage is 43 mb upon initial load and jumps to about 163 mb when the dropdown is clicked.  In the example there are four different instances of comboboxes and they all increase the memory when dropped down.  We are using the Q3 Silverlight 4 libraries.

Thanks for any info you can provide.
0
Kjell
Top achievements
Rank 1
answered on 22 Nov 2010, 09:27 PM
I am using 4.0.50917.0
0
Pana
Telerik team
answered on 24 Nov 2010, 03:00 PM
Hi Kjell,

RadComboBox is not using virtualization by default. I guess you can ease the load by setting the RadComboBox to use VirtualizingStackPanel for Panel (instead of the default StackPanel). If this does not work for you please do not hesitate to contact us.

Greetings,

Pana
the Telerik team

 

Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
ComboBox
Asked by
Kjell
Top achievements
Rank 1
Answers by
George
Telerik team
Kevin Webb
Top achievements
Rank 1
Kjell
Top achievements
Rank 1
Pana
Telerik team
Share this question
or