Pivot grid dimension expand settings are only honored for the first dimension on intialization.

1 Answer 105 Views
PivotGrid
Noah
Top achievements
Rank 2
Iron
Iron
Iron
Noah asked on 30 Mar 2023, 02:33 PM

If the following is my setup for the default row axes, even though both axes are set to expand: true, only the first one will actually be expanded when the pivot grid loads.  Maybe I am misunderstanding the point of having the name be an array of strings? the documentation doesn't seem to say what that is. Can I nest these somehow?

 

  defaultRowAxes: PivotGridAxis[] = [
    { name: ['Branch'], expand: true},
    { name: ['Truck'], expand: true },
  ];

1 Answer, 1 is accepted

Sort by
0
Yanmario
Telerik team
answered on 04 Apr 2023, 08:28 AM

Hi Noah,

To manage the expanded state of nested axes, the configuration needs to specify the complete path to the tuple member explicitly.

The following is an example configuration:

public defaultRowAxes: PivotGridAxis[] = [
    { name: ['Region'], expand: true },
    { name: ['Country'] }, // needed to display 'Countries' for each region, however setting expand to true here to expand all 'Countries' rows is not supported
    { name: ['Region&South America', 'Country'], expand: true }, // will expand the 'Country' row for South American Region
];

Here's a StackBlitz example that showcases the above configuration:

https://stackblitz.com/edit/angular-p9xysl?file=src%2Fapp%2Fapp.component.ts

If the scenario is different on your side, could you provide me a runnable example and the desired end result when the PivotGrid initializes?

I hope this helps.

Regards,
Yanmario
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PivotGrid
Asked by
Noah
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Yanmario
Telerik team
Share this question
or