RadNumericTextBox Dont add auto digits, allows custom digits.

2 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    May 2014

    Posted 26 Sep 2014 Link to this post

    Hi there:

    Im currently using the RadNumericTextBox to let users enter a value that ranges from 5000, to 0,0001. 
    Im using the NumericTextBox since it does not allow charecters etc, and i like that.

    My issue is when a user enters 0,0001 the box formats it to: 0,00 .

    And when the user inputs 5000 it formats it to 5.000,00.

    I want the user input to be true and not automaticly alter their input.

    In the event that my application needs to accept 12 digit whole IDs, i want the textbox to just have that (e.g 123456789876).
    Not have it changed to: 123.456.789.876,00

    If i set DecimalDigits to 0 it ofcourse wont allow me to enter digits.
    If i set GroupSeparator to ="" . It removes the group seperators but still adds digits to the end..

    Thanks in advance.
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 29 Sep 2014 Link to this post

    Hi Michael,

    If you don't want to show the zeroes after the decimal separator, turn off the AllowRounding.
    The markup below is based on your requirements.

    <telerik:RadNumericTextBox runat="server" MaxValue="5000" MinValue="0.0001" MaxLength="9">
        <NumberFormat DecimalDigits="5" GroupSizes="9" AllowRounding="false" />
    </telerik:RadNumericTextBox>


    Regards,
    Vasil
    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top