RadNumericTextBox DecimalDigits

6 posts, 1 answers
  1. John
    John avatar
    12 posts
    Member since:
    Mar 2008

    Posted 28 Mar 2008 Link to this post

    I have a group of approx 20 radNumericTextBox on one screen.  I need them all to show three digits of precision.  So need them to show values like:

    0.123
    0.120
    0.100
    0.321
    0.320
    0.300

    I have tried everything I can think of to get that display.  First setting the DecimalDigits to 3 and setting the radNumericTextBox value to the double value, no effect, if value in my double is 0.3 I get 0.3 displayed not 0.300

    Next tried setting the radNumericTextBox text to 0.300 no luck it displays 0.3

    Any Suggestions?

    Thanks
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 31 Mar 2008 Link to this post

    Hello John,

    If you specify the DecimalDigits like this you should be able to observe the proper formatting when the control is in display mode (i.e. when it does not have focus):

    <telerik:RadNumericTextBox ID="RadNum1" runat="server" Value="0.3"
        <NumberFormat DecimalDigits="3"></NumberFormat> 
    </telerik:RadNumericTextBox> 


    Could you confirm that this works on your end as well?


    Regards,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. John
    John avatar
    12 posts
    Member since:
    Mar 2008

    Posted 31 Mar 2008 Link to this post

    Does not work.

    Actually that was what I had first did not work.  I did change one of the boxes to reflect exaclly what you suggested and still did not work.  The box displays
    0.3
    I need it to show
    0.300

    Add info, these RadNumericTextBoxes are inside a PageView that are being displayed as part of a RadTabDtrip's multiview.

  4. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 31 Mar 2008 Link to this post

    Hello John,

    We have attached a sample application that demonstrates what we are observing on our local tests.

    Let us know if we are missing something out.


    Greetings,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. John
    John avatar
    12 posts
    Member since:
    Mar 2008

    Posted 31 Mar 2008 Link to this post

    The example provided works perfect.

    Not sure if I am happy or sad about that.  I do the same thing in my project and it does not work.  

    Will see if I can figure it out.

    Thanks
  6. John
    John avatar
    12 posts
    Member since:
    Mar 2008

    Posted 31 Mar 2008 Link to this post

    After using the provided example I cut the Number Format section out and pasted.  I must have manually typed in the decimaldigits property and what I had was:

    decimaldigits="3"
    when I changed to
    DecimalDigits="3"
    everything worked.

    using the caps made it all work.

    Thanks for the Help.

    John
Back to Top