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

[Solved] more on the whole memory leak thing with SL 4...

1 Answer 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Giancarlo Aguilera
Top achievements
Rank 1
Giancarlo Aguilera asked on 30 Sep 2010, 09:33 PM
hello,

first of all, thank you for being proactive on the whole memory leak thing with SL4. i downloaded the latest version of the telerik tools and it appears the issue with the inline datatemplates is no longer a problem with radgridview.

i am having another problem now though. please see the xaml below. This is the XAML for radgridview column. In the first couple of lines notice how I am setting the column's header to some content. This content contains a button with an event handler. Currently this button is commented out. However if I put the button back in there my app continues to leak and it appears to leak as a result of the event handler. I have attached a screenshot of an object retention graph produced by the profiler I am using. If you take a look you will see that the EvenCrewSheetMemberGridView is the instance being retained and this instance contains the XAML below. If I comment out the button, then I no longer have a leak. I am not sure who needs to fix what. Do you know if there is something I am doing wrong? Is this yet another SL4 memory leak? Or is this an issue with Telerik? Any ideas are greatly appeciated. Thanks again


    <telerikGrid:GridViewDataColumn Width="220" 
                                                DataMemberBinding="{Binding WorkAssignmentStatusText}">

                    <telerikGrid:GridViewDataColumn.Header>
                        <Grid >
                            <TextBlock Text="Status" VerticalAlignment="Center" HorizontalAlignment="Left" />
                            <!--<Button Content="Edit Colors..." Click="OnEditStatusColors"
                                    HorizontalAlignment="Right"  />-->
                        </Grid>
                    </telerikGrid:GridViewDataColumn.Header>

                    <telerikGrid:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <foxControls:ThreeDTile CornerRadius="2"
                                BorderBrush="{Binding WorkAssignmentStatus.BorderBrush}"                    
                                Background="{Binding WorkAssignmentStatus.Background}" >
                                <StackPanel Orientation="Horizontal">
                                    <Image Margin="0,2,0,2" Source="{Binding WorkAssignmentStatus.ImageSource}" 
                                           VerticalAlignment="Center"
                                           Width="16" Height="16"  />
                                    <TextBlock Foreground="{Binding WorkAssignmentStatus.Foreground}"
                                        Text="{Binding WorkAssignmentStatus.Text}" VerticalAlignment="Center" Margin="2,0,0,0" />
                                </StackPanel>
                            </foxControls:ThreeDTile>
                        </DataTemplate>
                    </telerikGrid:GridViewDataColumn.CellTemplate>

                    <telerikGrid:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerikInput:RadComboBox 
                                VerticalAlignment="Center" 
                                IsReadOnly="{Binding IsReadOnly}"
                                ItemsSource="{Binding WorkAssignmentStatuses}"
                                SelectedItem="{Binding WorkAssignmentStatus, Mode=TwoWay}"
                                Loaded="OnRadComboBoxLoaded"
                                >
                                <telerikInput:RadComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <Image Source="{Binding ImageSource}" Width="20" Height="20"  />
                                            <TextBlock Text="{Binding Text}" VerticalAlignment="Center" Margin="2,0,0,0"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </telerikInput:RadComboBox.ItemTemplate>
                            </telerikInput:RadComboBox>
                        </DataTemplate>
                    </telerikGrid:GridViewDataColumn.CellEditTemplate>
                </telerikGrid:GridViewDataColumn>


1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Oct 2010, 01:01 PM
Hi Giancarlo,

 You will need to remove the event handler by your own since the grid cannot know (and remove) this handler. 

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Giancarlo Aguilera
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or