Expand inner Row/Cols in Pivot Grid

1 Answer 81 Views
Excel Export Grid TreeView
Jaskaran
Top achievements
Rank 1
Jaskaran asked on 02 Dec 2022, 02:41 PM
Hi All,

I am facing an issue to open the inner Rows/Cols by default as we can do the top level Rows/Cols, But i can not find any function or render method to do so. I am attaching the screenshot for same. Please any help would be appreciated. 

Thanks

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 06 Dec 2022, 12:11 PM

Hello, Jaskaran,

This can be currently achieved by iterating over the defaultRowAxes using Object.keys and adding expand: true to each item:

const defaultRowAxes = [
  {
    name: ['Region'],
    expand: true,
  },
  {
    name: ['Country'],
  },
].concat(
  Object.keys(countries).map((country) => {
    return {
      name: ['Region&' + country, 'Country'],
      expand: true,
    };
  })
);

Here is an example that showcases this approach:

https://stackblitz.com/edit/react-tkrsqq-wkm7aa?file=app/main.jsx

I hope this helps.

Regards,
Filip
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
Excel Export Grid TreeView
Asked by
Jaskaran
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or