Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Input > NumericTextBox - decimal formatting

Answered NumericTextBox - decimal formatting

Feed from this thread
  • Posted on Jan 30, 2012 (permalink)

    I need to always display 4 decimal places in my numeric textbox. I've set DecimalDigits = 4 and set Keep Trailing Zeros to True, but when control loses focus, the trailing zeros disappear. What do I need to set to always show 4 decimal places (with trailing zeros if needed)?

    Here is my code:

    <telerik:RadNumericTextBox runat="server" ID="Longitude" Width="75" EmptyMessage="Lon" Skin="Vista"
            AllowOutOfRangeAutoCorrect="False" MaxValue="0" DataType="System.Decimal"
            EnableSingleInputRendering="True">
       <NumberFormat AllowRounding="False" DecimalDigits="4" KeepNotRoundedValue="True"
               KeepTrailingZerosOnFocus="True"  />
    </telerik:RadNumericTextBox>

    Reply

  • Answer Shinu MVP avatar

    Posted on Jan 31, 2012 (permalink)

    Hello Rayne,

    In order to show trailing zeroes on losing focus, try setting AllowRounding property as true.

    Thanks,
    Shinu.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Input > NumericTextBox - decimal formatting
Related resources for "NumericTextBox - decimal formatting"

ASP.NET Input Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]