如何在Kendo UI Grid中使列不可编辑?

时间:2013-03-22 06:59:10

标签: kendo-grid

如何在Kendo UI Grid中使列(自动生成)不可编辑? 我能想到的一种方法是使用自定义HTML编辑器并使其成为只读或禁用但我希望它是开箱即用的功能?

我错过了什么,不应该是财产或其他东西吗?

谢谢, 阿维

2 个答案:

答案 0 :(得分:1)

如果您使用内联编辑,那么这必须帮助您: 将该字段设置为可编辑:架构中为false。

               schema: {
                    model: {
                        id: "sr_id",
                        fields: 
                        {
                            card_number: { editable: false, type: "string" },
                            merchant: { editable: true, type: "string" }
                        }
                    }
                }

答案 1 :(得分:0)

在模型的fields选项中,制作每个列editable: false,但要编辑的除外:editable: true

在网格的选项中,有editable: true

有效。

相关问题