【问题标题】:change cell styling in KendoGrid在 KendoGrid 中更改单元格样式
【发布时间】:2014-02-27 11:38:55
【问题描述】:

刚发现 KendoGrid 并试图在更改另一个单元格值后更改单个列(单元格)的样式。例如,我有一个带有船名和船城列的网格。假设我有一条业务规则:

'Make shipcity cell value disabled when the shipname on the same row has the same value'

我发现这个示例使用了我可能使用的模糊事件,什么是实现此规则的好方法?

也很高兴知道您对 asp.net mvc 集成的看法。

jsfiddle 链接:http://jsfiddle.net/dingen2010/begjT/1/

【问题讨论】:

    标签: asp.net-mvc-4 razor kendo-ui kendo-grid kendo-asp.net-mvc


    【解决方案1】:

    更新链接:

    You can try the updated fiddle example here

    【讨论】:

      【解决方案2】:

      基本上不支持开箱即用的条件编辑器模板。你有两个选择。

      要么使用 Grid 的 edit 事件,在 e.container 中找到编辑器,然后按需要禁用它(如果使用 Kendo 小部件,请使用enable(false) 方法,如果是常规输入,则添加 readonly 属性。

      其他选项是定义自定义编辑器,如 this JsBin example 中所示。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-10-15
        • 1970-01-01
        • 2011-07-03
        • 2011-02-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-03-27
        相关资源
        最近更新 更多