我正在使用telerik:radnumerictextbox控件来提供小数输入, 我需要输入十进制的十进制输入,但radnumerictextbox默认显示值10.00,如何设置属性获取十进制值。
这是我在客户端使用的代码。
<telerik:radnumerictextbox
ID="txtDirectTime"
ShowSpinButtons="True"
InterceptArrowKeys="True"
Step="5" MinValue="0" runat="server">
提前致谢。
答案 0 :(得分:5)
试试这个
<telerik:RadNumericTextBox runat="server"
ID="YourTextBox"
NumberFormat-DecimalDigits="2" />
有关RadNumericTextBox
的详情,请访问here。
答案 1 :(得分:2)
NumberFormat-GroupSeparator=""
效果很好。
答案 2 :(得分:1)
在回答您的补充问题时,“如何删除','[千位分隔符]?”。
使用NumberFormat GroupSeparator属性作为控件标记的属性:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"
NumberFormat-GroupSeparator="" />
或作为子元素:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server">
<NumberFormat GroupSeparator="" />
</telerik:RadNumericTextBox>