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

negative zero in MaskedNumericInput

3 Answers 99 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 09 Sep 2014, 12:10 PM
Hi,

i have problem with MaskedNumericInput. When I write number 123 and set it into negative (-123), after that, when I rewrite it with 0 I get negative zero (-0)
can you help me with that? I hate Q2 2014

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 10 Sep 2014, 02:46 PM
Hello Jiri,

Indeed, by default the MaskedNumericInput component behaves like this. However, you can alter this behavior by setting the MaskedInputExtensions.AllowMinusOnZeroValue  attached property to False.

<telerik:RadMaskedNumericInput maskedInput:MaskedInputExtensions.AllowMinusOnZeroValue="False"/>

I hope this helps.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jiri
Top achievements
Rank 1
answered on 11 Sep 2014, 06:56 AM
thank you fot your reply.


I tried that, but it is working only half. When I have 0 in my NumericMaskedInput and I start writing some number and then press -, nothing happens.
0
Martin Ivanov
Telerik team
answered on 15 Sep 2014, 12:45 PM
Hello Jiri,

I placed the code snippet from my last reply into a new WPF project and I was not able to reproduce the reported issue as you can see in the linked video. Can you please send me an isolated project demonstrating this behavior and steps to reproduce it? This way I can test it locally and investigate the reason behind the issue.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Jiri
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Jiri
Top achievements
Rank 1
Share this question
or