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

5 posts, 0 answers
  1. Manoj
    Manoj avatar
    15 posts
    Member since:
    Mar 2014

    Posted 28 Apr 2015 Link to this post

    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.

  2. Manoj
    Manoj avatar
    15 posts
    Member since:
    Mar 2014

    Posted 30 Apr 2015 Link to this post

    Any update on this?
  3. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 30 Apr 2015 Link to this post

    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.

     
  4. Manoj
    Manoj avatar
    15 posts
    Member since:
    Mar 2014

    Posted 04 May 2015 in reply to Dimitrina Link to this post

    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

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 05 May 2015 Link to this post

    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.

     
Back to Top