0

嗨,我是新来使用 Extjs..
我有一个这样的网格面板:

  var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
        clicksToEdit: 1
  });

  var myGrid = Ext.create('Ext.grid.Panel', {
        store: myStore,
        plugins: [cellEditing],
        columns: [  
                {dataIndex: 'colid', hidden: true},
                {text: "Name", dataIndex: 'colname', sortable: true},
                {text: "Info", dataIndex: 'colinfo', sortable: true},
                {text: "Value", dataIndex: 'colvalue',
                 editor: {
                   xtype: 'textfield'
                 }
            }
        ]
    });

现在我想在colinfo值为“无法编辑此值!!”时将编辑器设置为 null(如列 colinfo、colname 和 colid)列colvalue 。 我如何配置该条件?

4

1 回答 1

0

您可以对要禁用的列使用渲染器功能。根据函数中的记录值,您可以将文本字段设置为禁用。

于 2012-12-13T08:47:52.187 回答