Posted 27 May 2020, 12:41 am EST
Hi Team,
I was trying to build up a Tree flexgrid which needs to be editable at specific column but for different type its input should be customized. for instance,
<wj-flex-grid #flex
[itemsSource]=“[data]”
[headersVisibility]=“‘Column’”
[selectionMode]=“‘Row’”
allowDragging=“None”
[allowSorting]=“false”
[childItemsPath]=“‘children’”
[isReadOnly]=“false”
(itemsSourceChanged)=“onSourceChanged(flex)”
[itemFormatter]=“itemFormatter”
(loadedRows)=“onLoadedRows(flex,$event)”
(beginningEdit)=“onBeginningEdit(flex, $event)”>
<wj-flex-grid-column [binding]=“‘value’” [header]=“‘Value’” [isReadOnly]=“false” [dataType]=“‘Number’” [format]=“‘n3’”>
<ng-template wjFlexGridCellTemplate [cellType]=“‘CellEdit’” let-item=“item”>
<wj-input-number *ngIf=“item.isPrimitiveType”
[format]=“‘n3’” [(value)]=“item.value” required >
<customer-selector *ngIf=“!item.isPrimitiveType”
[selectedId]=“item.id”>
But it looks like when editable works, the ng-template stop working.
How can I make it like the effect that when isPrimitiveType, it uses the edit of the cell, when !isPrimitiveType, it invokes the customer-selector component?
Thanks in advance.