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

Performance issue with largedatasets and HierarchyChildTemplate

3 Answers 187 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 26 Jul 2010, 07:24 PM
I am running into a performance issue where I have a HierarchyChildTemplate that shows a RadGridView with 10000+ data items. The initial databinding to the toplevel works very fast but trying to expand the hierarchy takes an incredible amount of time. I've tried using different combination the following to improve performance but they don't have any effect on the internal RadGridView.

DataLoadMode="Asynchronous"
ScrollMode="Deferred"
EnableRowVirtualization="True"

Is there a way to improve the performance or is this a bug?

Thanks,
Shawn

Here is my XAML:
<Telerik:RadGridView x:Name="ResultGrid" Grid.Row="1"
                                 VerticalAlignment="Stretch"
                                 CanUserReorderColumns="False"
                                 AutoGenerateColumns="False"
                                 Height="Auto"
                                 ScrollMode="Deferred"
                                 DataLoadMode="Asynchronous"
                                 EnableRowVirtualization="True"                                 
                                 ShowGroupPanel="False"
                                 Margin="2"
                                 IsReadOnly="True"
                                 BorderThickness="2">
    <Telerik:RadGridView.ChildTableDefinitions>
        <Telerik:GridViewTableDefinition >
        </Telerik:GridViewTableDefinition>
    </Telerik:RadGridView.ChildTableDefinitions>
    <Telerik:RadGridView.Columns>
        <Telerik:GridViewDataColumn Header="Mission" DataMemberBinding="{Binding MissionName, Mode=OneWay}" IsReadOnly="True"/>
        <Telerik:GridViewDataColumn Header="Antenna" DataMemberBinding="{Binding AntennaName, Mode=OneWay}" IsReadOnly="True"/>
    </Telerik:RadGridView.Columns>
    <Telerik:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <Telerik:RadGridView x:Name="ResultGridChild"
                                 CanUserFreezeColumns="False"
                                 AutoGenerateColumns="True"
                                 ItemsSource="{Binding Locations}"
                                 ShowGroupPanel="False"
                                 IsReadOnly="True" IsFilteringAllowed="False" CanUserDeleteRows="False" CanUserInsertRows="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserSelect="False" CanUserSortColumns="False">
                <Telerik:RadGridView.Columns>
                    <Telerik:GridViewDataColumn DataMemberBinding="{Binding Latitude}" Header="Latitude" />
                    <Telerik:GridViewDataColumn DataMemberBinding="{Binding Longitude}" Header="Longitude" />
                    <Telerik:GridViewDataColumn DataMemberBinding="{Binding Longitude}" Header="Altitude" />
                    <Telerik:GridViewDataColumn DataMemberBinding="{Binding Value}" Header="Value" />
                </Telerik:RadGridView.Columns>
            </Telerik:RadGridView>
        </DataTemplate>
    </Telerik:RadGridView.HierarchyChildTemplate>
</Telerik:RadGridView>


3 Answers, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 27 Jul 2010, 06:43 AM
Hi Shawn,

Please specify Height for the child grid and let me know if you still have problems. 

Sincerely yours,
Vanya Pavlova
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
0
David
Top achievements
Rank 1
answered on 27 Jul 2010, 03:03 PM
Thank you Vanya .That did the trick. The child grid is now as fast as the parent.

Regards,
Shawn

0
John
Top achievements
Rank 1
answered on 22 Feb 2011, 09:31 PM
While this does work, it has several issues.

1. The need to specify a somewhat arbitrary height value. This is very inelegant since most of the time, the WPF/SL UI is able to respond well to layout changes without the need to write any code-behind.
2. More importantly, we end up with a scrollbar within a scrollbar scenario, which is just ugly and less intuitive to the user.

Prior to realizing that RadGridView has the Hierarchy* properties, I had implemented the same by using a row details style that contained a child RadGridView. This has the same issue of non-virtualization when Height=Auto or Star. Once I discovered that RadGridView has the ChildTableDefinitions property, I had hoped that the parent RadGridView would virtualize its entire contents. But, sadly, no it does not.

I realize that it's a very tricky thing to do, and it may come with some tight usage constraints, but consider this a feature request for the parent-most RadGridView to be able to virtualize its entire contents, including child grids. At least for Rows.
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
David
Top achievements
Rank 1
John
Top achievements
Rank 1
Share this question
or