我有一个像这样的数字文本框:
@(Html.Kendo().NumericTextBoxFor(model => model).Format("c").Decimals(2).Spinners(false))
但是这仍然允许用户在编辑模式下输入超过2个小数位 当它失去焦点时会向上或向下舍入。 (即13.126转为13.13)
1)有没有办法阻止用户在编辑模式下输入2个以上的十进制值
2)防止自动舍入发生(因此如果输入13.126则保持为13.12)
答案 0 :(得分:0)
尝试使用Round(false)
例如:
@(Html.Kendo().NumericTextBoxFor(
model => model).Format("c").Decimals(2).Round(false).Spinners(false)
)