Extjs4 Sencha Ext JS4。。[Grid ActionColumn]不';t显示

Extjs4 Sencha Ext JS4。。[Grid ActionColumn]不';t显示,extjs4,extjs,Extjs4,Extjs,我是新加入SenchaJS4的。我已经按照《sencha文档指南》中关于如何使用actioncolumn的说明进行了操作,但它没有显示在我的网格上 “我错过了什么?有什么我跳过的吗?或者有什么我没有包括在内的吗?帮助…” 我使用sencha提供给我的kitchenSink示例。我试图操纵它,并从kitchenSink示例中的一个网格添加了一个actioncolumn 这是我的密码: Ext.define('PayrollLite.view.GridExample', { extend: 'Ext

我是新加入SenchaJS4的。我已经按照《sencha文档指南》中关于如何使用
actioncolumn
的说明进行了操作,但它没有显示在我的网格上

“我错过了什么?有什么我跳过的吗?或者有什么我没有包括在内的吗?帮助…”

我使用sencha提供给我的
kitchenSink
示例。我试图操纵它,并从
kitchenSink
示例中的一个网格添加了一个
actioncolumn

这是我的密码:

Ext.define('PayrollLite.view.GridExample', {
extend: 'Ext.grid.Panel',

frame: true,
width: 1200,
height: 750,

store: 'Employees',

columns: 
[
    { text: 'Employee Code', width: '10%', dataIndex: 'EmployeeCode' },
    { text: 'Last Name', width: '22%', dataIndex: 'LastName'},
    { text: 'First Name', width: '25%', dataIndex: 'FirstName' },
    { text: 'Middle Name', width: '15%', dataIndex: 'MiddleName' },
    { text: 'Position', width: '15%', dataIndex: 'PositionID', sortable: false },
    {
        xtype:'actioncolumn',
        width:50,
        items: [{
            icon: 'extjs/examples/shared/icons/fam/cog_edit.png',  // Use a URL in the icon config
            tooltip: 'Edit',
            handler: function(grid, rowIndex, colIndex) {
                var rec = grid.getStore().getAt(rowIndex);
                alert("Edit " + rec.get('firstname'));
            }
        },{
            icon: 'extjs/examples/restful/images/delete.png',
            tooltip: 'Delete',
            handler: function(grid, rowIndex, colIndex) {
                var rec = grid.getStore().getAt(rowIndex);
                alert("Terminate " + rec.get('firstname'));
            }
        }]
    }
]
});

我最好的猜测是宽度-尝试将其他列设置为“弹性宽度”。像这样:

Ext.define('PayrollLite.view.GridExample', {
extend: 'Ext.grid.Panel',

frame: true,
width: 1200,
height: 750,

store: 'Employees',

columns: 
[
    { text: 'Employee Code', flex: '1', dataIndex: 'EmployeeCode' },
    { text: 'Last Name', flex: '2.2', dataIndex: 'LastName'},
    { text: 'First Name', flex: '2.5', dataIndex: 'FirstName' },
    { text: 'Middle Name', flex: '1.5', dataIndex: 'MiddleName' },
    { text: 'Position', flex: '1.5', dataIndex: 'PositionID', sortable: false },
    {
        xtype:'actioncolumn',
        width:50,
        items: [{
            icon: 'extjs/examples/shared/icons/fam/cog_edit.png',  // Use a URL in the icon config
            tooltip: 'Edit',
            handler: function(grid, rowIndex, colIndex) {
                var rec = grid.getStore().getAt(rowIndex);
                alert("Edit " + rec.get('firstname'));
            }
        },{
            icon: 'extjs/examples/restful/images/delete.png',
            tooltip: 'Delete',
            handler: function(grid, rowIndex, colIndex) {
                var rec = grid.getStore().getAt(rowIndex);
                alert("Terminate " + rec.get('firstname'));
            }
        }]
    }
]
});

sry,我是说。。我的代码有什么问题?它缺少一些要求吗?还是语法错误?这就是为什么它不显示任何内容?我的问题是。。“为什么它不显示我在表格项目中插入的actioncolumn?”“请随意编辑您的帖子以添加说明。