Posted 14 September 2017, 11:46 am EST
Hi, i have an issue with the new angular2 version and custom cell editing.
The value of the textarea is lost after the end of editing the cell.
This is my grid code:
<wj-flex-grid #mainGrid
[itemsSource]=“data”
class=“grid”
[style.height]=“gridHeight + ‘px’”
[allowResizing]=“‘Both’”
[allowAddNew]=“true”
[allowDelete]=“true”
(initialized)=“initialized(grid)”
(cellEditEnded)=“cellEditEnded(grid, $event)”
(resizedColumn)=“resizedColumn(grid, $event)”
(sortedColumn)=“sortedColumn(grid, $event)”
(updatedLayout)=“updatedLayout(grid)”
>
<!-- row numbers-->
<template wjFlexGridCellTemplate [cellType]="'RowHeader'" let-cell="cell">
{{cell.row.index}}
</template>
<!-- top left corner element-->
<template wjFlexGridCellTemplate [cellType]="'TopLeft'">
<span class="">#</span>
</template>
<wj-flex-grid-column [header]="'Id'" [binding]="'id'" [wordWrap]="true"></wj-flex-grid-column>
<wj-flex-grid-column [header]="'Finding DE'" [binding]="'finding_de'" [wordWrap]="true" [width]="'*'"></wj-flex-grid-column>
<wj-flex-grid-column [header]="'Finding EN'" [binding]="'finding_en'" [wordWrap]="true" [width]="'*'"></wj-flex-grid-column>
<wj-flex-grid-column [header]="'Beschreibung DE'" [binding]="'description_de'" [wordWrap]="true" [width]="'*'" [isContentHtml]="true"></wj-flex-grid-column>
<wj-flex-grid-column [header]="'Beschreibung EN'" [binding]="'description_en'" [wordWrap]="true" [width]="'*'" [isContentHtml]="true">
<!-- custom cell edit with textarea -->
<template wjFlexGridCellTemplate [cellType]="'CellEdit'" let-cell="cell">
<div class="tadiv">
<textarea [(value)]="cell.value"></textarea>
</div>
</template>
</wj-flex-grid-column>
</wj-flex-grid>
Best regards, Asmo