Grid Master-Detail: Header Template to Toggle all +/- expansion states

1 Answer 586 Views
Grid
felix.wagner
Top achievements
Rank 1
felix.wagner asked on 27 Sep 2021, 11:57 AM

We are using the Kendo Angular Grid Master-Detail View (https://www.telerik.com/kendo-angular-ui/components/grid/master-detail/detail-template/).

What we want to achieve is a toggle button in the header of the +/- expansion column, which toggles the expansion stage.

I did some research and found out that it's possible to toggle the expansion state programmatically, but no way to do this from the column header.

Is there a way to include a button in the expansion row header, am I missing something?

Thanks in advance!

1 Answer, 1 is accepted

Sort by
1
Accepted
Yanmario
Telerik team
answered on 28 Sep 2021, 09:27 AM

Hi Felix,

Indeed there isn't a built-in(template) to modify the desired expand columns and header of the Master-Detail Grid. Alternatively, a button can be created to expand all Master-Detail Grid columns and then adjusted with custom CSS to fit in the empty space in the header, as demonstrated in the following demo:

https://stackblitz.com/edit/angular-bsfhvz-a7mt1z?file=app%2Fapp.component.ts

I would also encourage you to vote on the following thread in our feedback portal:

https://feedback.telerik.com/kendo-angular-ui/1434631-customize-hierarchy-cell-with-a-templateref

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/.

felix.wagner
Top achievements
Rank 1
commented on 28 Sep 2021, 11:31 AM

Hi Yanmario,

I've implemented your solution, for it works that way, nevertheless I'm looking forward to a build-in function and added my vote in the provided link.

Thanks again and have a nice day,

Felix

Tags
Grid
Asked by
felix.wagner
Top achievements
Rank 1
Answers by
Yanmario
Telerik team
Share this question
or