问题
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);
},
The ordertype column should be editable when RequestAmount column is 0, but is not. Can someone tell me where am I wrong?
回答1:
Try this
edit: function (e) {
var kendoTextBox = e.container.find("input[name=Ordertype]")[0];
if (kendoTextBox && e.model.RequestAmount !== 0)
this.closeCell();
}
来源:https://stackoverflow.com/questions/28898845/kendo-ui-grid-conditionally-editable-cell