Posted 14 September 2017, 3:14 am EST
How can I set the width of a column when I edit a cell. And then when the edition is finished return to the old width. I tried with the begginingEdit and prepareCellForEdit but throws me that is not a method for the flex grid.
I use ng-template for edition, this is the code:
<wj-flex-grid #materialsGrid [itemsSource]="materialData" > <wj-flex-grid-column *ngFor="let col of materialColumns" [header]="col.header" [binding]="col.binding" > <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" *ngIf="col.binding === 'receptionMaterial'" let-cell="cell"> <wj-combo-box [itemsSource]="materialCombo" [(selectedValue)]="cell.value" [isEditable]="false"> </wj-combo-box> </ng-template> <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" *ngIf="col.binding === 'matEdition'" let-cell="cell" let-item="item"> Edit ... </ng-template> <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" *ngIf="col.binding === 'matEdition'" let-cell="cell" let-item="item"> <div *ngFor="let prop of item.matEdition" > <h5>{{prop.propertyName}}</h5> <wj-input-number [(value)]="prop.value" [format]="'n'" [step]="1" style="width:130px;"> </wj-input-number> <wj-combo-box [itemsSource]="getPropertyMeasure(prop)" [isEditable]="false" [(text)]="prop.measure" style="width:100px;"> </wj-combo-box> </div> </ng-template> </wj-flex-grid-column> </wj-flex-grid>
I Want to set the width for the last CellEdit