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

[Solved] Numeric Box with Percent input from keyboard

3 Answers 120 Views
NumericBox for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Geoff
Top achievements
Rank 1
Geoff asked on 15 Oct 2014, 05:15 PM
Hello,

I have a Numeric Box formatted to display as a percent. It initially displays the value as expected - for example .25 will show as 25%. But there's an issue with manual input of the value from the keyboard. For example, to specify a value of 50%, the user must type 0.5, rather than 50, which is undesirable. Is there any way to configure the numeric box to allow the user to type "50" to specify 50%?

Here is how I've defined the control:
<telerik:RadNumericBox Value="{Binding FrequencyPercent, Mode=TwoWay}" VerticalAlignment="Center" AllowNullValue="False" ValueFormat="{}{0,0:P2}" SmallChange="0.01" LargeChange="0.1" Maximum="1" />

Thanks!
Geoff

3 Answers, 1 is accepted

Sort by
0
Geoff
Top achievements
Rank 1
answered on 20 Oct 2014, 01:09 PM
Any ideas on this one?
0
Accepted
Dimitrina
Telerik team
answered on 20 Oct 2014, 02:26 PM
Hi Geoff,

Please find an attached project that demonstrates this scenario.

I hope this helps. Let us know if you have further questions.

Regards,
Dimitrina
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
Geoff
Top achievements
Rank 1
answered on 20 Oct 2014, 03:02 PM
Hi Dimitrina,

Thank you for the reply. This solution is not ideal as it requires writing the converter when this functionality should be built into the control itself, but it satisfies my needs. Thanks!

Geoff
Tags
NumericBox for XAML
Asked by
Geoff
Top achievements
Rank 1
Answers by
Geoff
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or