Posted 9 March 2018, 5:46 am EST
Hello,
Angular 5
Typescript
Wijmo: 5.20173.409
Is it possible to reload the flexgrid control?
I have next example.
<wj-flex-grid [itemsSource]=“data” [selectionMode]=“row” class=“grid” #flex [headersVisibility]=“‘Column’”>
<wj-flex-grid-column *ngIf="true" [header]="''" [isReadOnly]="true" [width]="30"> <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell"> <input class="wj-cell-check" type="checkbox" #isChecked [(ngModel)]="isCheck" (click)="onMultipleSelectedItem(cell, $event)"/> </ng-template> </wj-flex-grid-column>
The problem: I have two buttons to switch data in flexgrid. So when the user clicks on the first button he will get data with some checkboxes - he can check the items and everything is ok. But when he chooses second button the data are reloaded (new data arrived) but checkboxes are not reset, flexgrid remember the old check items.
I try next steps to refresh flexgrid:
this.flex.invalidate(); this.flex.refresh();
Any idea how to reset checkbox state on button click?
Thank you
