Hi
I'm trying to create a grid which has a mixture of multi-column headers and normal headers. I don't know the number / type of columns at design time so I'm using an array and trying to loop round the columns using a recursive template shown below.
<
kendo-grid
#grid [data]="result.rows"
[navigable]="true">
<
ng-container
*
ngTemplateOutlet
=
"recursiveColumns; context:{ columns: result.columns }"
>
</
ng-container
>
</
kendo-grid
>
<
ng-template
#recursiveColumns
let-cols
=
"columns"
>
<
ng-container
*
ngFor
=
"let c of cols"
>
<
kendo-grid-column
*
ngIf
=
"!c.isGroup"
field
=
"{{c.field}}"
title
=
"{{c.title}}"
[locked]="c.isLocked || false">
</
kendo-grid-column
>
<
kendo-grid-column-group
*
ngIf
=
"c.isGroup"
title
=
"{{c.title}}"
>
<
ng-container
*
ngTemplateOutlet
=
"recursiveColumns; context:{ columns: c.columns }"
></
ng-container
>
</
kendo-grid-column-group
>
</
ng-container
>
</
ng-template
>
Unfortunately the columns / groups do not get rendered. As far as I can tell my template is correct - everything is displayed correctly if I change the page to write out nested divs instead.
Please can you let me know if what I'm trying to achieve is possible? and if so,what changes I need to make to get it to work.
Thanks
Keith