This is a migrated thread and some comments may be shown as answers.
Decimal precision to significant digit
7 Answers 73 Views
This is a migrated thread and some comments may be shown as answers.
Simon Williams
Top achievements
Rank 1
Simon Williams asked on 29 Jul 2011, 04:27 PM
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

7 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 03 Aug 2011, 09:33 AM
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 >>
0
J.S.
Top achievements
Rank 1
answered on 05 Aug 2011, 10:22 AM
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,
0
Simon Williams
Top achievements
Rank 1
answered on 05 Aug 2011, 11:03 AM
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


0
Wenrong
Top achievements
Rank 1
answered on 23 Oct 2012, 03:40 AM
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)
.
0
Vladi
Telerik team
answered on 25 Oct 2012, 02:21 PM
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.

0
Russell
Top achievements
Rank 1
answered on 14 Aug 2015, 02:52 PM
Hi, I need this too - have you done/fixed this yet? thanks
0
Geri
Telerik team
answered on 17 Aug 2015, 08:16 AM
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
Asked by
Simon Williams
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
J.S.
Top achievements
Rank 1
Simon Williams
Top achievements
Rank 1
Wenrong
Top achievements
Rank 1
Vladi
Telerik team
Russell
Top achievements
Rank 1
Geri
Telerik team
Share this question
or