Posted 14 September 2017, 11:37 am EST
Hi, I’m trying to follow your cell template example to get Buttons to custom column.
Sadly I cant get any further because I end up with an error. (see below)
It seems template dont have the variables item, cell, row defined.
Any Idea? Do I miss smth? I’m out of ideas.
TS
@Component({ selector: 'ressources', templateUrl: 'app/modules/ressource/ressources.component.html', directives: [CORE_DIRECTIVES, BaseGrid, GridSearchBox, CustomGrid, wjGrid.WjFlexGrid, wjGrid.WjFlexGridColumn, wjGrid.WjFlexGridCellTemplate, wjGrid.WjTemplateCmp, wjCore.WjComponentLoader, EditableSelectionRenderer, EditableButtonRenderer, wjInput.WjMenu, wjInput.WjMenuItem, FORM_DIRECTIVES , CORE_DIRECTIVES], providers: [LoggerService, RessourceService] })
HTML
<wj-flex-grid #flex [allowResizing]="'Both'" class="grid" [itemsSource]="ressources" [isReadOnly]="false" [allowAddNew]="true"> <wj-flex-grid-column [header]="'ID'" [binding]="'Key'" [width]="80"></wj-flex-grid-column> <wj-flex-grid-column [header]="'string'" [binding]="'ContentString'"></wj-flex-grid-column> <wj-flex-grid-column [header]="'Product'" [binding]="'Key'"> <template wjFlexGridCellTemplate [cellType]="'Cell'" #cell="cell"> <button> </button> </template> </wj-flex-grid-column> </wj-flex-grid>
Error:
browser_adapter.js:77 Error: Uncaught (in promise): Template parse errors:
There is no directive with “exportAs” set to “cell” (" [binding]=“‘Key’”>
<template wjFlexGridCellTemplate [cellType]=“‘Cell’” [ERROR ->]#cell=“cell”>