如何在网格中的列中添加一个 extjs 按钮以显示另一个 window?

How to add a extjs button in a column in the grid to show another window?

我有一个包含搜索结果的列,但我需要在单击按钮后显示结果中添加的一些信息,但我该怎么做? 我需要创建一个按钮来显示,有人可以帮助我吗?

谢谢。 罗德里戈.

我认为您正在寻找的是 ActionColumn(在 Google 上不难找到,顺便说一句...):

http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.grid.column.Action

您可以为此使用操作列:

{
    xtype:'actioncolumn',
    width:50,
    items: [{
        icon: 'extjs-build/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-build/examples/restful/images/delete.png',
        tooltip: 'Delete',
        handler: function(grid, rowIndex, colIndex) {
            var rec = grid.getStore().getAt(rowIndex);
            alert("Terminate " + rec.get('firstname'));
        }
    }]
}