gpt4 book ai didi

asp.net - RadNumericTextBox 中的舍入问题

转载 作者:行者123 更新时间:2023-12-04 05:20:27 25 4
gpt4 key购买 nike

我有一个 RadNumericTextBox,如下所示:

  <telerik:RadNumericTextBox ID="txtCurSalBudget" runat="server" Enabled="False" >
<NumberFormat AllowRounding="false" />
</telerik:RadNumericTextBox>

当我将值 23190642.0 移动到此文本框时,它会四舍五入,结果为 23190640,即使 AllowRounding="false"。

如何避免这种舍入,以便我得到实际值?

最佳答案

使用此代码在文本框中显示十进制数字:

<telerik:RadNumericTextBox ID="txtCurSalBudget" runat="server" Enabled="False" >
<NumberFormat AllowRounding="false" DecimalDigits="2" GroupSeparator=" " />
</telerik:RadNumericTextBox>

该属性(property)

DecimalDigits



允许十进制数字直到您输入的数字,显示在您的文本框中。

关于asp.net - RadNumericTextBox 中的舍入问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13737309/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com