Defining significant digits

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

  • Posted 8 September 2017, 3:06 pm EST

    Hi there!

    I<span style="font-size:10pt;">s there a way to limit the user input of a number cell to a certain amount of significant digits?</span>

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

    <span style="font-size:10pt;">12.45
    </span><span style="font-size:10pt;">177.5
    </span><span style="font-size:10pt;">0.9876</span>

    But you should not be able to enter:



    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


    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.


    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels