Kendo UI网格有条件可编辑单元格
问题描述:
我正在尝试通过编写代码在剑道中创建条件可编辑单元格:
I am trying to do conditionally editable cells in kendo by writing code:
edit: function (e) {
var kendoTextBox = e.container.find("input[name=Ordertype]")[0];
if (kendoTextBox)
kendoTextBox.enable(e.model.RequestAmount == 0);
},
当RequestAmount列为0时,ordertype列应该是可编辑的,但不是.有人可以告诉我我在哪里错了吗?
The ordertype column should be editable when RequestAmount column is 0, but is not. Can someone tell me where am I wrong?
答
尝试一下
edit: function (e) {
var kendoTextBox = e.container.find("input[name=Ordertype]")[0];
if (kendoTextBox && e.model.RequestAmount !== 0)
this.closeCell();
}