negative zero in MaskedNumericInput

4 posts, 0 answers
  1. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 09 Sep 2014 Link to this post

    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
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 10 Sep 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 11 Sep 2014 Link to this post

    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.
  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 15 Sep 2014 Link to this post

    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.
     
Back to Top