[英]How to add a extjs button in a column in the grid to show another window?
我有一栏包含搜索结果,但是单击按钮后我需要显示一些添加到结果中的信息,但是我该怎么做呢? 我需要创建一个显示按钮,有人可以帮助我吗?
韩国社交协会。 罗德里戈。
您可以为此使用操作列:
{
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'));
}
}]
}
我认为您正在寻找的是ActionColumn(在Google顺便说一下...上很难找到):
http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.grid.column.Action
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.