Flex Grid edit numeric start with dot

Posted by: bzhang on 8 May 2019, 12:39 pm EST

    • Post Options:
    • Link

    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”>

    ${{cell.item.adjustAmt| number:‘1.2-6’ }}




    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

  • Posted 9 May 2019, 12:26 am EST

    Hi Boyang,

    We are sorry for the inconvenience.

    This was a bug in the build version that you are using. It has been verified as fixed in the latest build 5.20191.605.

    Please refer to the following demo sample for reference:

    https://stackblitz.com/edit/angular-tcuilh?file=app/data-svc.service.ts

    Also, there is no need to assign (text) explicitly as you have done in your code snippet.

    Regards,

    Manish Gupta

  • Posted 9 May 2019, 4:42 pm EST

    Thanks manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels