Unplanned
Last Updated: 02 Oct 2020 07:54 by ADMIN
Chris
Created on: 01 Oct 2020 16:35
Category: PivotGrid
Type: Feature Request
3
RadPivotGrid: Start group on row descriptor

Hello,

I am using the pivot grid control would like to know if it is possible to add a start and end to the grouping?

My pivot grid looks like this: I would like the user to be able to specify a start and end for the grouping.

Excel has this option:

 

How can I replicate this functionality?

1 comment
ADMIN
Dess | Tech Support Engineer, Sr.
Posted on: 02 Oct 2020 07:54

Hello, Chris,

Currently, RadPivotGrid doesn't offer such functionality out of the box. I have logged it in our feedback portal by making this thread public on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

I can suggest you a little bit different approach with the currently available functionality in RadPivotGrid.

Depending on the field type, such a group descriptor is created. When you populate the pivot with data in correspondence with the Using the DataSource property help article for example, a PropertyGroupDescription is added to the ColumnGroupDescriptions collection. When you hide it and add it again using the field list, a DoubleGroupDescription is created, considering the field type. As a result, a range of numbers is displayed. However, you can change this behavior by subscribing to the DataProvider.PrepareDescriptionForField event and replace the DoubleGroupDescription with a PropertyGroupDescription as follows: 

this.radPivotGrid1.DataProvider.PrepareDescriptionForField += DataProvider_PrepareDescriptionForField;
        private void DataProvider_PrepareDescriptionForField(object sender, PrepareDescriptionForFieldEventArgs e)
        {
            if (e.Description is DoubleGroupDescription)
            {
                e.Description = new PropertyGroupDescription() { PropertyName = e.Description.DisplayName, GroupComparer = new GrandTotalComparer() };
            }
        }

Alternatively, you can specify the step by setting the DoubleGroupDescription.Step property in the PrepareDescriptionForField event and then use the filter functionality: https://docs.telerik.com/devtools/winforms/controls/pivotgrid/filtering/group-filters 

 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).