Pivot Grid Sorting and Others.

2 posts, 0 answers
  1. Shahrooz
    Shahrooz avatar
    4 posts
    Member since:
    Aug 2011

    Posted 16 Sep 2014 Link to this post

    Hello Team,

    Please help me to resolve the below two issues in PivotGrid.

    1. Ability to sort aggregate columns doesn't work.In the calculation If you choose highest to lowest A.) it doesn't work B.) it won't allow us to keep the number format you desire. In the example below I want to keep % and rank highest to lowest. Please see the attached image (image1.png).


    2. Cannot use the same field twice (i.e, we cannot add a column in both Row Labels and Report Filter) This is extremely limiting. Please see the below image (image2.png).


    If we achieve the above two, then we can generate more reports easily with Pivot Grid. Please help me to resolve the above two.

    Regards,
    Shahrooz
  2. Polya
    Admin
    Polya avatar
    200 posts

    Posted 16 Sep 2014 Link to this post

    Hello Shahrooz,

    In RadPivotGrid we cannot sort the aggregates because they are only values in cells. However, we can sort the Group Descritptions (in rows and columns) based on the values in the cells. We just have to use GrandTotalComparer as shown in this article and sort by aggregate.

    Regarding using a field in both Report Filters and Row Groups - by design if we drag a field from the Field List to rows/columns/filters/aggregates the description for this field is removed from its previous position and a new description is created at the new position.
    The only way the desired can be achieved is by initially adding a description for this field in rows and filters in the DataProvider:
    <pivot:LocalDataSourceProvider x:Key="DataProvider" ItemsSource="{Binding}">
        <pivot:LocalDataSourceProvider.RowGroupDescriptions>
            <pivot:PropertyGroupDescription PropertyName="Advertisement" />
        </pivot:LocalDataSourceProvider.RowGroupDescriptions>
     
        <pivot:LocalDataSourceProvider.FilterDescriptions>
            <pivot:PropertyFilterDescription PropertyName="Advertisement">
                <pivot:PropertyFilterDescription.Condition>
                    <pivot:SetCondition Comparison="DoesNotInclude">
                        <pivot:SetCondition.Items>
                            <sys:String>Magazine</sys:String>
                            <sys:String>Direct mail</sys:String>
                        </pivot:SetCondition.Items>
                    </pivot:SetCondition>
                </pivot:PropertyFilterDescription.Condition>
            </pivot:PropertyFilterDescription>
        </pivot:LocalDataSourceProvider.FilterDescriptions>
    </pivot:LocalDataSourceProvider>

    This way a PropertyGroupDescription and a FilterGroupDescription will be created for this field simultaneously. Note that as long as this field is not removed from the rows/columns/filters the two descriptions will remain. However, if we remove one of the descriptions we cannot re-add it again when dragging from the Field List.

    Hopefully this helps.

    Regards,
    Polya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top