RadNumericTextBox decimal digits zero problem

2 posts, 0 answers
  1. Cagdas
    Cagdas avatar
    14 posts
    Member since:
    Nov 2013

    Posted 18 Jan 2014 Link to this post

    Number of decimal digits will show up. Whether the trailing zeros don't appear.



    Specifies whether the control will keep its zero numbers(when set to true) and show them when it is focused, according to the DecimalDigits setting. Otherwise (when set to false) the old behavior is preserved - the control will not display decimal zeros when focused. By default this property is set to false.

    This behavior works radnumrecitextbox mouse click event.

    Do not click the mouse when not in radnumrecitextbox zero


  2. Konstantin Dikov
    Konstantin Dikov avatar
    2115 posts

    Posted 21 Jan 2014 Link to this post

    Hello Cagdas,

    The behavior that you are referring to is expected. As the property clearly states, it applies only for the trailing zeros when the input is on focus. When the input is blurred, the DecimalDigits property will be take into account and if there are trailing zeros available, they will be visible.

    However, if you want to remove the trailing zeros regardless the DecimalDigits property you could use the following approach:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function numericTextBox1Load(sender, args) {
            function numericTextBox1Blur(sender, args) {
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" NumberFormat-DecimalDigits="3" Value="200.22000">
        <NumberFormat AllowRounding="true" KeepNotRoundedValue="false" />
        <ClientEvents OnBlur="numericTextBox1Blur" OnLoad="numericTextBox1Load" />

    Hope that helps.

    Konstantin Dikov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top