RadMaskedNumericInput: After decimal point reseting to '0' for Mask=#30.2

2 posts, 0 answers
  1. Ravi
    Ravi avatar
    2 posts
    Member since:
    Mar 2014

    Posted 03 Mar 2014 Link to this post

    Hi Guys,

    I am using Telerik Q3 dlls 2013.3.1316.1050 for Silverlight.
    I am using RadMaskedNumericInput with Mask=#30.2 as per requirements.
    If I put Mask=#12.2the entire Text is displayed but for Mask=#30.2 the digits after decimal point are reseting to ‘0’,even If I edit it after the text box looses focus it is again reseting to’0’. Ideally it should display the changed text.
    Please find my piece of code:
                                    Placeholder=" "
                                    Value ="{Binding Amount, Mode=TwoWay, StringFormat=\{0:n2\}}"

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 05 Mar 2014 Link to this post

    Hello Ravi,

    RadMaskedNumericInput's Value is of type double? and double in C# (.Net) has precision of 15-16 digits.
    Every kind parsing might return wrong results when you type a double bigger than 15 digits.
    If you really need a Mask= "30.2" we highly encourage you to use RadMaskedCurrenyInput whose value is of type decimal? and it can be used for numbers in such big range.

    Petar Mladenov

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  3. DevCraft R3 2016 release webinar banner
Back to Top