This is a migrated thread and some comments may be shown as answers.

NumericUpDown Formatting Issue

3 Answers 85 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Muds
Top achievements
Rank 1
Muds asked on 12 Mar 2015, 04:52 PM
Hi

We have a requirement wherein a NumericUpdown has to display numbers in a 2 digit decimal format.

So the User enters - 40.12

and Model value should be set to 0.4012

can this be done by some formatting options ?

Hope my question is clear.

Thanks

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 16 Mar 2015, 09:06 AM
Hello Mudit,

We are afraid that with its current implementation RadNumericUpDown does not support the desired by you functionality. We logged that in our Feedback portal as Feature Request, so you can vote for it and track its status on the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/153447-provide-an-option-to-set-custom-stringformat-for-the-value-of-radnumericupdown

However, what we could suggest you as one possible approach to achieve the desired format for the Value is to bind it to a property inside the ViewModel. Inside its set implementation using some custom logic you could change the entered value into the desired format.

Hopes this helps.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Muds
Top achievements
Rank 1
answered on 16 Mar 2015, 10:40 AM
yes, I could figure that out really !

but don't you think having a value converter is going to be a better option than having view model supporting it ?
0
Nasko
Telerik team
answered on 16 Mar 2015, 02:37 PM
Hello Mudit,

Yes, you could also use a converter in order to achieve the needed functionality. So, you could choose the approach that best suits your needs and scenario.

I hope this will help you.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
NumericUpDown
Asked by
Muds
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Muds
Top achievements
Rank 1
Share this question
or