NumberCellType formatting question

Posted by: sean-miller on 8 September 2017, 12:59 pm EST

  • Posted 8 September 2017, 12:59 pm EST

    How do I have a cell behave as follows:


    I type 1.9 and cell displays 1.9, typing 1.987643 displays 1.987643, and typing 1.90 displays 1.9.


    This would be the same behavior as the .NET PropertyGrid.


    I would like to be able to say display at least 3 digits but allow more if needed. When I specify a cell type of NumberCellType it is only allowing me to type 2 digits by default.

  • Replied 8 September 2017, 12:59 pm EST

    What are you setting the DecimalPlaces property to?
  • Replied 8 September 2017, 12:59 pm EST

    I have decimal places set to 3.


    So when I type 1.1 I get 1.100 displayed which is what I want.


    However I would like to be able to type 1.12345 which I can't because I am limited to 3. In other words I do not want to limit the user to the number of decimla places they may enter.

  • Replied 8 September 2017, 12:59 pm EST

    You can set the DecimalPlaces to a higher number if you like, but with FixedPoint defaulting to true it will show zeros in the place holding decimals.  So if you type 1.1 with DecimalPlaces set to 5 it would display as 1.10000 instead of 1.100 as you are wanting.  Unfortunately in this case it's going to have to be one way or the other.
Need extra support?

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

Learn More

Forum Channels