I enclosed a kendo-grid-column within a new component by using
<imx-gridColumn field="Count" title="Count">
...
</imx-gridColumn>
The component that includes the imx-gridColumn
is templated with
<kendo-grid-column #column field="{{field}}">
...
</kendo-grid-column>
Everything seems to be working smoothly. Now I want to do something like
<imx-gridColumn field="Message" title="A longer message">
<ng-template kendoGridCellTemplate let-dataItem>
<button (click)="ShowMessage(dataItem)">Show my message</button>
</ng-template>
</imx-gridColumn>
in order to apply a template specifically to this column. Other columns should use the standard template provided by the kendo-grid-column
.
Is there a straightforward way to pass the ng-template
to the kendo-grid-column
?
If not, how can I modify the content of the column so that the button is used instead of plain text?
Edit
After some investigation, I managed to extract the template using
@ContentChild(TemplateRef) Template:TemplateRef<ElementRef>
, which at least contains some data. But now I'm struggling with pushing this template to my kendo-grid-column
.