我正在使用Kendo网格来编辑数据。我的问题是,当我编辑一个单元格时,它将数字四舍五入到两位小数,即使单元格的格式为4位小数。
为什么它的表现如此?
答案 0 :(得分:2)
您可以为该列添加editor
函数。类似的东西:
columns: [
...
{
field: "Value",
width: 200,
format: "{0:##.####}",
editor: function(container, options) {
// create an input element
$("<input name='" + options.field + "'/>")
.appendTo(container)
.kendoNumericTextBox({
decimals: 4
});
}
},
...
]
在此处查看此行动:http://jsfiddle.net/OnaBai/p92d1q8z/