【问题标题】:RadnumericTextbox rounding issueRadnumericTextbox 舍入问题
【发布时间】:2013-04-12 18:41:19
【问题描述】:

代码:

<telerik:RadNumericTextBox ShowSpinButtons="False"  DisplayText="Infinite" 
                  ID="MaximumAmount_tb" runat="server"  IncrementSettings-InterceptArrowKeys="true">
                <ClientEvents OnFocus="OnMAximumAmounttbFocus" />
                </telerik:RadNumericTextBox>

 function OnMAximumAmounttbFocus(sender, args) {
    //alert(sender.get_displayValue());
    if (sender.get_displayValue() == "Infinite") {
        sender.set_value("9,999,999,999,999.99999");

    }
    else
    {return false; }

}

我总是得到这个数字作为焦点的结果:10000000000000 为什么?以及如何解决我的问题以显示:9999999999999.99999?

【问题讨论】:

    标签: c# telerik


    【解决方案1】:

    正如文档 (http://www.telerik.com/help/aspnet-ajax/input-numerictextbox-basics.html) 所说,“RadNumericTextBox 不支持幅度大于 +/- 2^46 的最大值和最小值。” -- 所以它基本上可以包含大约 14 个有效数字。您正在尝试设置 18 位有效数字,这对它来说太多了。

    【讨论】:

      猜你喜欢
      • 2012-11-24
      • 2011-08-23
      • 2011-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多