Mickey P
Mickey P

Reputation: 181

How to re-use kendoGridHeaderTemplate in kendo grid

It is possible to provide custom templates for heading of columns in Kendo grid, but I didn't find any possibilities to re-use this functionality.

Link to working fork from Kendo documentation - StackBlitz

Is it possible to extract kendoGridHeaderTemplate to one place and use it for all column headings?

I tried to add as kendoGridToolbarTemplate and it didn't work

Also I tried to use ngTemplateOutlet and it didn't work as well

Upvotes: 0

Views: 1072

Answers (1)

SiliconSoul
SiliconSoul

Reputation: 829

Doesn't seem to be a way to define a header template at one place. You could however reuse the template by rendering it with ngTemplateOutlet inside the column header template:

https://stackblitz.com/edit/angular-emwxk6-juzffl?file=app/app.component.ts

Upvotes: 2

Related Questions