Extjs/Sencha:在Ext.grid.EditorGridPanel中锁定列-可能/如何?

Extjs/Sencha:在Ext.grid.EditorGridPanel中锁定列-可能/如何?,grid,extjs,Grid,Extjs,我试图在Sencha的EditorGridPanel中锁定几列 它应该是这样的,但在可编辑的网格中: 根据我在网上找到的例子,它应该和“locked:true”一起工作。 事实上并非如此 我的代码是坏了还是信息错了?我正在使用ext.js3.3.0 var grid = new Ext.grid.EditorGridPanel({ title:'Editor', clicksToEdit: 1, enableColLock: true, store: store

我试图在Sencha的EditorGridPanel中锁定几列 它应该是这样的,但在可编辑的网格中:

根据我在网上找到的例子,它应该和“locked:true”一起工作。 事实上并非如此

我的代码是坏了还是信息错了?我正在使用ext.js3.3.0

var grid = new Ext.grid.EditorGridPanel({
    title:'Editor',
    clicksToEdit: 1,
    enableColLock: true,
    store: store,
    columns: [
    {
        header: 'ID',
        width: 30,
        locked: true,
        sortable: true,
        dataIndex: 'id',
        hidden: true
    },
    ...
如果“lock”的意思是使列不可编辑,则可能指的是config选项:

{
    header: 'ID',
    width: 30,
    editable: false,
    sortable: true,
    dataIndex: 'id',
    hidden: true
}
您还可以通过以下方式以编程方式更新此值:

grid.getColumnModel().setEditable(0, false);
如果“lock”的意思是使列不可编辑,则可能指的是config选项:

{
    header: 'ID',
    width: 30,
    editable: false,
    sortable: true,
    dataIndex: 'id',
    hidden: true
}
您还可以通过以下方式以编程方式更新此值:

grid.getColumnModel().setEditable(0, false);

资料来源中有一个例子 在examples/grid/locking-grid.html中


您必须使用LockingColumnModel和LockingGridView。

源代码中有一个示例 在examples/grid/locking-grid.html中

您必须使用LockingColumnModel和LockingGridView。

否,我的“锁定”是指“冻结”,请参见否,我的“锁定”是指“冻结”,请参见