Kendo UI网格有条件可编辑单元格 [英] Kendo UI grid conditionally editable cell

查看:478
本文介绍了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();
}

这篇关于Kendo UI网格有条件可编辑单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆