我正在使用带有NumericTextBox
. 通常NumericTextBox
小数位限制为两位,即,如果我输入 10.135,则该值将被格式化为 10.14。但我需要的是获得 10.135 本身。这里要做什么。
我的模型定义。
var GridViewModel = new kendo.data.Model.define({
fields: {
Name: { type: "string", editable: false },
Weight: { type: "number", editable: true, validation: { required: true } },
}
});
在我的视图模型中,我将 Grid 设置为。
$("#DryingBinItemsAddedGrid").kendoGrid({
dataSource: {
data: DataDetails,
schema: {
model: GridViewModel
},
},
editable: true,
dataBound: function () {
},
columns: [
{
field: "Name",
title: "Name"
},
{
field: "Weight",
title: "Total Weight"
}
]
});
在这个例子中我没有提到我失败的尝试。目前我的Weight
字段是一个带有两个字段的数字文本框。这里要做什么才能使我的Weight
字段成为带有 3 个小数点的 NumericTextBox。