Using content projection (<ng-content>) in Kendo Grid

1 Answer 97 Views
General Discussions Grid
Ryan
Top achievements
Rank 1
Iron
Ryan asked on 19 Nov 2024, 06:03 AM | edited on 19 Nov 2024, 06:06 AM

I am attempting to standardize a lot of my grids for my application. They all follow the same general set up for filtering, sorting, etc. But each grid might have some specific customizations. Usually this is just customizing the command column to have different command (edit button, actions menu, etc), but this can also take the form of additional toolbar buttons and the like.

To do this, I am trying to make a component that uses Kendo Grid, has it set up the way I want to, but uses <ng-content> to project additional requirements.

However, it seems this is completely ignored by the grid, and nothing is ever rendered.

Example stackblitz which shows the issue: https://stackblitz.com/edit/angular-zc4drs?file=src%2Fapp%2Fapp.component.ts

The actual kendo grids that I'm working on are much more complicated, which is a large motivation for having a common component that I can use and inject additional stuff into as needed. Any help would be appreciated. 

1 Answer, 1 is accepted

Sort by
1
Martin Bechev
Telerik team
answered on 21 Nov 2024, 01:56 PM

Hello Ryan,

I noticed that you've already participated in another forum thread about this topic. Please find more details there:

https://www.telerik.com/forums/kendo-angular-editor-content-projection-for-custom-toolbar

Regards,
Martin Bechev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
General Discussions Grid
Asked by
Ryan
Top achievements
Rank 1
Iron
Answers by
Martin Bechev
Telerik team
Share this question
or