Flexgrid only positive numbers

Posted by: eveverad3 on 1 July 2020, 4:56 am EST

    • Post Options:
    • Link

    Posted 1 July 2020, 4:56 am EST

    I am using Flexgrid with Angular 8

    I have a column that has [dataType]=“‘Number’” and [format]=“‘g4’”

    The users should not be able to insert any negative number and neither 0. Every positive number above 0 is allowed, for example: 0.0001

    How can i achieve this?

    Thanks

  • Posted 1 July 2020, 6:37 am EST

    The version I am currently using is “wijmo”: “^5.20182.523”,

  • Posted 1 July 2020, 6:34 pm EST

    Hi,

    You can use the CollectionView’s getError property to validate that the number can only be a positive number. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-6uj1ke

    In this sample, if you will enter any negative value in the Amount column, the grid will throw an error.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels