Is possible to assign wijmo fexgrid column as DateType Int?

Posted by: arun.sunny on 30 July 2020, 10:09 pm EST

    • Post Options:
    • Link

    Posted 30 July 2020, 10:09 pm EST

    Hi team,

    When we assign a wijmo column as DateType.Number, user is allowed only to enter decimal numbers.

    I have a requirement to allow only integer in a wijmo coumn.

    Is it possible configure a column to allow only integer entry?

    Regards

    Arun Sunny

  • Posted 3 August 2020, 4:59 pm EST

    Hi Arun,

    There is no way to set integer as the data type of a column. But, you can set the format of the column to ‘d’ and it will only display and save the integer part of the value. You may still be able to enter a decimal value but it will be saved as integer.

    Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-pxzwwf

    Regards,

    Ashwin

  • Posted 4 August 2020, 9:28 pm EST

    Hi Ashwin,

    I tried ‘d’ format.

    If I enter decimal value It displays only integer, but it saves decimal value.

    Can we restrict saving of decimal value some way?

    Regards,

    Arun Sunny

  • Posted 5 August 2020, 6:42 pm EST

    Hi Arun,

    Sorry for the mistake. I thought setting ‘d’ as the format will also update the value internally.

    In order to achieve this behavior, you will need to handle the cellEditEnded event and remove the decimal places from the value manually. Please refer to the updated sample link below:

    https://stackblitz.com/edit/angular-jb9sht

    ~regards

  • Posted 6 August 2020, 2:17 am EST

    Thanks Ashwin, I will try the same

Need extra support?

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

Learn More

Forum Channels