Decimal precision to significant digit

8 posts, 0 answers
  1. Simon Williams
    Simon Williams avatar
    13 posts
    Member since:
    Jun 2010

    Posted 29 Jul 2011 Link to this post

    Hi,

    We develop engineering software tools which means we must support values to varying degrees of accuracy.

    For input from the user we are using the RadNumericUpDown control and set the NumberOfDecimalDigits property to the required precision. This works great however, for example if we set the precision to 10dp, the control displays 0.000000000 for a value of "0".

    How can we change the control to display the value up the the significant digit rather than the maximum precision specified on the control?

    To further clarify:

    with a max of 10dp precision allowed if the user enters "1.1234" the value in the text box is 1.1234000000. However the user just wants to see 1.1234 without the trailing zeros.

    Regards
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 03 Aug 2011 Link to this post

    Hi Simon,

    I am afraid that this is not possible with the current implementation of the control. If we receive more clients' requests we will consider implementing a way to remove the unnecessary digits.
    Sorry for the caused inconvenience.

    All the best,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. J.S.
    J.S. avatar
    3 posts
    Member since:
    Jun 2011

    Posted 05 Aug 2011 Link to this post

    Hi.

    This would be a greate feature.
    Currently we switched to the "Extended WPF Toolkit" from Codeplex if we need a NumericUpDown. 
    It is free and supports the requested behaviour.


    Regards,
  5. Simon Williams
    Simon Williams avatar
    13 posts
    Member since:
    Jun 2010

    Posted 05 Aug 2011 Link to this post

    Thanks for your reply J.S

    Yeah we have switched over to the DoubleUpDown which we are now using which has the desired affect. They also have a DecimalUpDown and IntegerUpDown.

    Regards


  6. Wenrong
    Wenrong avatar
    36 posts
    Member since:
    May 2012

    Posted 22 Oct 2012 Link to this post

    I would also like to see this feature implemented. Our software are dealing with generic environments where the required precision is not known beforehand. Currently we have to set the digits to a high value just in case customer needs it, but it look really bad if the actual value doesn't require so many digits.

    I would like to see an option to trim the trailing zeros on display, or an option to turn off decimal place enforcement on data binding (i.e. user can still manually enter 1.23456 when NumberOfDecimalDigits=2, and it will not be changed to 1.23 quietly)
    .
  7. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 25 Oct 2012 Link to this post

    Hi,

    As we see this is an feature request that you would like to see implemented in the control we have logged it in our Public Issue Tracker system. You can find it here where you can vote and track its status.

    If it gets enough votes we will consider implementing it as a built-in feature in the control.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Russell
    Russell  avatar
    1 posts
    Member since:
    Jan 2015

    Posted 14 Aug 2015 in reply to Konstantina Link to this post

    Hi, I need this too - have you done/fixed this yet? thanks
  9. Geri
    Admin
    Geri avatar
    60 posts

    Posted 17 Aug 2015 Link to this post

    Hi Russell,

    The HideTrailingZeros property of RadNumericUpDown has been introduced with the Q3 2013 SP1 Release version. More information on it you can find here:

    http://docs.telerik.com/devtools/wpf/controls/radnumericupdown/features/formatting.html#hide-trailing-zeros

    Hope this helps.

    Regards,
    Geri
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready