使用EXTJS在列内容Ext.grid.Panel中显示按钮

时间:2014-02-04 15:39:13

标签: extjs

我正在尝试使用EXT JS开发一个Ext.grid.Panel。 我需要有一个列,其中内容是一个按钮。 显然有些人认为这样做不会起作用

this.columns = [
        {
            text     : 'column1',
            width    : 120,
            sortable : true,
            flex: 1,
            dataIndex: 'col1'
        },{
xtype: 'button',
width    : 120
}
//...

另外,我已经绑定了一些像one这样的例子但是对我不起作用。 任何利兹? 提前致谢

1 个答案:

答案 0 :(得分:0)

尝试使用actioncolumnExtjs docs):

{
        xtype: 'actioncolumn',
        width: 50,
        items: [{
            handler: function(grid) {
                alert("works");
            }
        }]
}