Defining significant digits

Posted by: robinsword on 8 September 2017, 3:06 pm EST

  • Posted 8 September 2017, 3:06 pm EST

    Hi there!

    Is there a way to limit the user input of a number cell to a certain amount of significant digits?

    Example: I would like to define 4 significant digits for a cell, so valid inputs would be for example:

    1.879
    12.45
    177.5
    0.9876

    But you should not be able to enter:

    1.6574
    12.543 

     

    How can I do this?

    I'm using FarPoint Spread for Windows Forms  v2.5.2011.2005

  • Replied 8 September 2017, 3:06 pm EST

    Hello,

    You can use the DecimalPlaces property to restrict the number of digits appearing after the decimal seperator. However, there is not a direct way to restrict the overall digit count in number cell. You would need to keep a check on the same as soon as the user stops editing in the cell to see if the total digit count in the cell is 4 or not and accordingly truncate or display the value.

    Hope it helps.

    Thanks,

    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels