RadDataPager & Aggregate function

2 posts, 0 answers
  1. Lasse
    Lasse avatar
    1 posts
    Member since:
    May 2015

    Posted 25 Sep 2017 Link to this post

    Dear support representative,

    issue is that my RadGridView aggregation functions seems too slow.
    I have RadGridView bound with IQueryable collection and it has sum aggregation function enabled for 4 columns.
    RadGridView has also paging enabled, is set to normally load 100 rows per page.
    In SQL table there are about 120 thousand rows and it takes about 2 sec. to calculate sum on a float type column.
    In RadGridView it is about 8 sec. to load initial page with aggregation and 1 sec. if aggregation is not used.
    Note that PersistableRadGridView is derived form RadGridView just to have couple more properties related to saving settings.
    Any leads?
    Currently working on binding aggregation values to VM's property so I would not need to use the sum.

        Style="{StaticResource RadGridViewWithFilters}"
        FrozenColumnCount="{Binding FrozenColumns}"
        behaviours:RadGridViewColumnsBinding.ColumnsCollection="{Binding Columns}"
        behaviours:DoubleClickBehavior.Command="{Binding ShowDetailsViewCommand}"
        behaviours:RadGridViewFilterBehavior.Filters="{Binding ColumnFilterDescriptors}"
        behaviours:RadGridViewSortDescriptorsBinding.SortDescriptorsCollection="{Binding ColumnSortDescriptors}"
        Key="{Binding PersistanceKey}"
        RememberFilters="{Binding RememberFilters, Mode=TwoWay}"
        IsRememberFilterDisabled="{Binding DisableRememberFilters, Mode=TwoWay}"
        ItemsSource="{Binding QueryableData}"
            <Style TargetType="{x:Type telerik:GridViewCell}">
                <Setter Property="Template">
                            <ContentPresenter x:Name="PART_ContentPresenter" Margin="{TemplateBinding Control.Padding}"
                                              Content="{TemplateBinding ContentControl.Content}"
                                              ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                                              VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
                                              HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"/>
            <behaviours:MultiSelectBehavior SelectedItems="{Binding SelectedEntries, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            <behaviours:RadGridViewRememberFiltersBehavior />
  2. Stefan
    Stefan avatar
    880 posts

    Posted 28 Sep 2017 Link to this post

    Hi Lasse,

    Thank you for the provided code.

    After reviewing it, I noticed that the Asynchronous DataLoadMode of RadGridView is used. Generally, this is not recommended. Also, can you please try setting the GroupRenderMode of the control to Flat? Basically, this is the newer virtualization mechanism of the control and has a lot of improvements compared to the older Nested one. More information can be found in the Grouping Modes topic. Is there any difference in the performance of the control? Furthermore, I encourage you to review the Tips and Tricks and Degraded Performance topics on how the performance of the control can be improved.

    Best Regards,
    Stefan X1
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top