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

Radgridview freezes when trying to display 500 rows of data in hierarchical view

4 Answers 395 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 28 Apr 2015, 05:09 PM

I am displaying couple of rows in the normal view and whenever any of those rows are expanded, display additional 500 rows using hierarchical view.

The radgridview freezes up when trying to display the 500 rows. I tried with 50 rows and the grid did not freeze. 

I have attached a sample project which duplicates the issue. (It is actually a zip file, not jpg).

Please look at the BindableDynamicDictionary.cs.The relevant function which generates the rows dynamically is GetUserDetails.

This function is called whenever TryGetMember function is called by the radgridview with parameter "Details".

Details is the bound property for the child grid.Most of the other code can be ignored.

Can you please help identify the issue?

 

Please note the attachement is a .zip file. Not jpg.

4 Answers, 1 is accepted

Sort by
0
Manoj
Top achievements
Rank 1
answered on 30 Apr 2015, 05:14 AM
Any update on this?
0
Dimitrina
Telerik team
answered on 30 Apr 2015, 03:25 PM
Hi,

In order to improve the performance in the specific solution, you should set a fixed Height of the child GridView.

For more suggestions on how to improve the performance of the control, please check the following article:
Tips and Tricks for a better performance.

As a side note, I would suggest you considering RowDetailsTemlpate instead of HierarchyChildTemplate.
For example:
<telerik:RadGridView.Columns>
    <telerik:GridViewToggleRowDetailsColumn/>
</telerik:RadGridView.Columns>
<telerik:RadGridView.RowDetailsTemplate>
    <DataTemplate>
        <telerik:RadGridView telerik:StyleManager.Theme="Windows8"  IsReadOnly="True"
                       Height="300"
                       AutoGenerateColumns="True" 
                       ItemsSource="{Binding Details}"
                       RowIndicatorVisibility="Collapsed"
                       CanUserFreezeColumns="False"
                       IsFilteringAllowed="False"
                       ShowGroupPanel="False">
</telerik:RadGridView>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>

Regards,
Dimitrina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Lawrence
Top achievements
Rank 2
Iron
commented on 26 Aug 2021, 08:29 PM

Setting the "MaxHeight" also works.
0
Manoj
Top achievements
Rank 1
answered on 04 May 2015, 11:59 AM

Hi Dimitrina,

 The changes you suggested fixed the issue. Thanks a lot !

One more clarification :

i. Is it possible that I can unload the data that was loaded when collapsing the row detail? Essentially I want to clear the Details property that was created when the row expanded.

 ii. I have placed the radgridview inside a Grid whose row height set to *. Will this cause the virtualization to turn off in gridview?

 

  <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="0.05*" />
            <RowDefinition Height="*" />
 </Grid.RowDefinitions>
 
...
 
<telerik:RadGridView telerik:StyleManager.Theme="Windows8" Grid.Row="1" ...>

If yes, would setting a fixed height to radgridview improve performance? 

iii. Is there any advantage of using RowDetailsTemplate over HierarchyChildTemplate especially from the performance point of view?

 

Thanks,

Manoj

0
Dimitrina
Telerik team
answered on 05 May 2015, 02:35 PM
Hello Manoj,

I am glad to hear the issue is now fixed.

As to your further question:
i. No until the entire row is unloaded
ii. This is the recommended way to place RadGridView. The ui virtualization should work as expected.
iii. We recommend using RowDetailsTemplate as it have performance improvements.

Regards,
Dimitrina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Manoj
Top achievements
Rank 1
Answers by
Manoj
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or