Posted 8 May 2019, 12:39 pm EST - Updated 3 October 2022, 8:04 pm EST
Hello Wijmo team,
I am using wijmo 5 and angular 5 in our project right now.
We are facing an issue with flex grid now. Most of our customers like edit their data via keyboard and always type in decimals start with dot. So, they always press the dot key then the numbers. So, the values are like .789 . Now, we are using flex grid and allow them to edit data on the grid. Here is the column sample of our project.
<wj-flex-grid-column [header]=“‘Adj Amt’” [binding]=“‘adjustAmt’” [name]=“‘adjustAmt’” [width]=“80” [align]=“‘right’” [isReadOnly]=“!isAuthorized(auth)” [cssClass]=“isAuthorized(auth)?‘editAble’:‘’”>
<ng-template wjFlexGridCellTemplate [cellType]=“‘Cell’” let-cell=“cell”>
<div *ngIf=“cell.item.adjustAmt>=0”>${{cell.item.adjustAmt | number:‘1.2-6’ }}
<div ngIf=“cell.item.adjustAmt<0”>-${{(-1)(cell.item.adjustAmt) | number:‘1.2-6’ }}
<ng-template wjFlexGridCellTemplate [cellType]=“‘CellEdit’” let-cell=“cell”>
<wj-input-number [(value)]=“cell.value” [format]=“‘n6’” (text)=“cell.value”>
<ng-template wjFlexGridCellTemplate [cellType]=“‘ColumnFooter’” let-cell=“cell”>
As shown in the sample, we use wj-input-number for editing. Every time when user press dot in the grid it shows as the attachment “screen shot 1”. User has to press the dot key again to start input the decimals.
If we remove the wj-input-number, and let user use the default editor, the user can type any letter or symbel with mistake even it will be truncate.
I was try on your samples which is custom editor, its behavior is same as what we are facing.
Now, I need a way that user just need to press the dot key and then could start input decimals without any issues. And the editor will block all the other keys except number, negative and dot.
Do you have any solutions for this scenario?
Thanks,
Boyang
By the way, my current wijmo package is C1Wijmo-Enterprise_5.20172.328.zip and angular version is 5.1.0
bzhang